Update ora_gpt4.py
This commit is contained in:
parent
1be1e440fd
commit
99d36a7753
1 changed files with 13 additions and 0 deletions
|
@ -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)
|
Loading…
Reference in a new issue