summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/ora_gpt4.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/ora_gpt4.py b/testing/ora_gpt4.py
index 1191d0ad..ab1fbf96 100644
--- a/testing/ora_gpt4.py
+++ b/testing/ora_gpt4.py
@@ -25,3 +25,16 @@ model = ora.CompletionModel.load(chatbot_id, 'gpt-4')
response = ora.Completion.create(model, 'hello')
print(response.completion.choices[0].text)
+conversation_id = response.id
+
+while True:
+ # pass in conversationId to continue conversation
+
+ prompt = input('>>> ')
+ response = ora.Completion.create(
+ model = model,
+ prompt = prompt,
+ includeHistory = True, # remember history
+ conversationId = conversation_id)
+
+ print(response.completion.choices[0].text) \ No newline at end of file