From 2c7aa6bc3ca0d5f761bbf996391f035c6c8bed25 Mon Sep 17 00:00:00 2001 From: YasinOnm08 Date: Mon, 16 Sep 2024 11:21:09 +0200 Subject: [PATCH 1/2] input/output --- py/simple_chat.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 py/simple_chat.py diff --git a/py/simple_chat.py b/py/simple_chat.py new file mode 100644 index 0000000..53203d1 --- /dev/null +++ b/py/simple_chat.py @@ -0,0 +1,10 @@ +from api import api + +chat1 = api() + +while True: + print("Gib deine Frage ein") + input_text = input() + + output_text = api.send_message(chat1, input_text) + print(output_text) \ No newline at end of file From 480660b5efdb92a4f6ff52ed1b735305a9f8a311 Mon Sep 17 00:00:00 2001 From: YasinOnm08 Date: Mon, 16 Sep 2024 11:59:15 +0200 Subject: [PATCH 2/2] model change possible --- py/simple_chat.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/py/simple_chat.py b/py/simple_chat.py index 53203d1..3bb0c16 100644 --- a/py/simple_chat.py +++ b/py/simple_chat.py @@ -1,10 +1,20 @@ -from api import api +from api import API -chat1 = api() +chat1 = API() while True: - print("Gib deine Frage ein") - input_text = input() - - output_text = api.send_message(chat1, input_text) - print(output_text) \ No newline at end of file + 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) \ No newline at end of file