Merge pull request 'input/output' (#18) from YasinOnm08/ai-virtual-assistant:main into main

Reviewed-on: https://interstellardevelopment.org/code/code/React-Group/ai-virtual-assistant/pulls/18
This commit is contained in:
Patrick 2024-09-16 12:01:51 +02:00
commit 22f56e0bac

20
py/simple_chat.py Normal file
View file

@ -0,0 +1,20 @@
from api import API
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("ungültiges Modell")
continue
while True:
print("")
print("Ask a question")
inputText = input ()
if inputText == "change":
break
outputText = chat1.send_message(inputText, model)
print(outputText)