-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Aetherius_Terminal_Mode.py
35 lines (28 loc) · 1.15 KB
/
Aetherius_Terminal_Mode.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
from Aetherius_API.Main import *
import logging
import json
import asyncio
async def chat_with_Aetherius(message, history, mode, username, user_id):
bot_name = "Aetherius"
if mode == "chat_bot":
response = await Aetherius_Chatbot(message, username, user_id, bot_name)
else: # Default to Agent mode
response = await Aetherius_Agent(message, username, user_id, bot_name)
return response
async def main():
history = []
user_info = input("Enter your username and user ID separated by a space: ")
username, user_id = user_info.split()
mode = input("Select mode (chat_bot/Agent): ").lower()
while mode not in ["chat_bot", "agent"]:
print("Invalid mode. Please choose 'chat_bot' or 'Agent'.")
mode = input("Select mode (chat_bot/Agent): ").lower()
while True:
user_input = input("You: ")
if user_input.lower() == 'exit':
break
response = await chat_with_Aetherius(user_input, history, mode, username, user_id)
history.append({"user": user_input, "bot": response})
if __name__ == "__main__":
asyncio.run(main())