Merge pull request 'Backend modifycation' (#15) from React-Group/ai-virtual-assistant:main into main

Reviewed-on: https://interstellardevelopment.org/code/code/sageTheDm/ai-virtual-assistant/pulls/15
This commit is contained in:
sageTheDm 2024-09-17 08:06:29 +02:00
commit 72e8a08636
2 changed files with 1 additions and 25 deletions

View file

@ -1,24 +0,0 @@
from api import API
class CLIChat:
@staticmethod
def chat():
chat1 = API()
while True:
print("")
print("Which AI Model do you want to use? Write as a Number (1-5).")
model_input = input()
model = int(model_input)
if model <= 0 or model > 5:
print("Invalid model.")
continue
while True:
print("")
print("Ask a question")
input_text = input()
if input_text == "change":
break
output_text = chat1.send_message(input_text, model)
print(output_text)

View file

@ -25,7 +25,7 @@ def index():
elif option == "chat": elif option == "chat":
messages.append(f"User: {user_message}") messages.append(f"User: {user_message}")
ai_response = "AI: " + api.send_message(user_message, 1) ai_response = "AI: " + api.send_message(user_message, 3)
messages.append(ai_response) messages.append(ai_response)
return render_template('index.html', messages=messages) return render_template('index.html', messages=messages)