mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-15 06:13:01 +00:00
Update ora_gpt4.py
This commit is contained in:
parent
1be1e440fd
commit
99d36a7753
@ -25,3 +25,16 @@ model = ora.CompletionModel.load(chatbot_id, 'gpt-4')
|
|||||||
response = ora.Completion.create(model, 'hello')
|
response = ora.Completion.create(model, 'hello')
|
||||||
|
|
||||||
print(response.completion.choices[0].text)
|
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 New Issue
Block a user