fix wrong func.

This commit is contained in:
Cyberes 2023-04-19 13:28:53 -06:00
parent 924f1caa39
commit d68262bfee
1 changed files with 4 additions and 1 deletions

View File

@ -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
if openai_model in ['gpt-3', 'gpt-4']:
text_response = response["choices"][0]["message"]["content"].strip().strip('\n') 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: