api timeout

This commit is contained in:
Cyberes 2023-03-19 15:15:12 -06:00
parent 9c982d66e9
commit 36ed6f0a95
1 changed files with 1 additions and 1 deletions

View File

@ -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