From 99d36a77530eae8585baa777d628f8bb134bec40 Mon Sep 17 00:00:00 2001 From: "t.me/xtekky" <98614666+xtekky@users.noreply.github.com> Date: Sun, 23 Apr 2023 16:53:18 +0100 Subject: Update ora_gpt4.py --- testing/ora_gpt4.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.2.3