summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-23 17:53:18 +0200
committert.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-23 17:53:18 +0200
commit99d36a77530eae8585baa777d628f8bb134bec40 (patch)
treef0f9dff0afb44801765d5626ef3528c1d49f3d87
parentdisclaimer & legal notice (diff)
downloadgpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar.gz
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar.bz2
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar.lz
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar.xz
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.tar.zst
gpt4free-99d36a77530eae8585baa777d628f8bb134bec40.zip
Diffstat (limited to '')
-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