diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index 49fed9e..e2f1de6 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -196,7 +196,7 @@ async def process_chat( if index != -9999: messages.insert(index, {"role": "system", "content": injected_system_prompt}) - response = openai_obj.ChatCompletion.create(model=openai_model, messages=messages, temperature=0) + response = openai_obj.ChatCompletion.create(model=openai_model, messages=messages, temperature=0, timeout=10) text_response = response["choices"][0]["message"]["content"].strip().strip('\n') # Logging stuff