t.me/xtekky
commited on
Commit
•
99d36a7
1
Parent(s):
1be1e44
Update ora_gpt4.py
Browse files- testing/ora_gpt4.py +13 -0
testing/ora_gpt4.py
CHANGED
@@ -25,3 +25,16 @@ model = ora.CompletionModel.load(chatbot_id, 'gpt-4')
|
|
25 |
response = ora.Completion.create(model, 'hello')
|
26 |
|
27 |
print(response.completion.choices[0].text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
response = ora.Completion.create(model, 'hello')
|
26 |
|
27 |
print(response.completion.choices[0].text)
|
28 |
+
conversation_id = response.id
|
29 |
+
|
30 |
+
while True:
|
31 |
+
# pass in conversationId to continue conversation
|
32 |
+
|
33 |
+
prompt = input('>>> ')
|
34 |
+
response = ora.Completion.create(
|
35 |
+
model = model,
|
36 |
+
prompt = prompt,
|
37 |
+
includeHistory = True, # remember history
|
38 |
+
conversationId = conversation_id)
|
39 |
+
|
40 |
+
print(response.completion.choices[0].text)
|