fix wrong func.
This commit is contained in:
parent
924f1caa39
commit
d68262bfee
|
@ -215,7 +215,10 @@ async def process_chat(
|
||||||
await client.room_typing(room.room_id, typing_state=False, timeout=15000)
|
await client.room_typing(room.room_id, typing_state=False, timeout=15000)
|
||||||
await react_to_event(client, room.room_id, event.event_id, '❌')
|
await react_to_event(client, room.room_id, event.event_id, '❌')
|
||||||
return
|
return
|
||||||
text_response = response["choices"][0]["message"]["content"].strip().strip('\n')
|
if openai_model in ['gpt-3', 'gpt-4']:
|
||||||
|
text_response = response["choices"][0]["message"]["content"].strip().strip('\n')
|
||||||
|
elif openai_model in ['text-davinci-003', 'davinci-instruct-beta', 'text-davinci-001', 'text-davinci-002', 'text-curie-001', 'text-babbage-001']:
|
||||||
|
text_response = response["choices"][0]["text"].strip().strip('\n')
|
||||||
|
|
||||||
# Logging stuff
|
# Logging stuff
|
||||||
if log_full_response:
|
if log_full_response:
|
||||||
|
|
Loading…
Reference in New Issue