api timeout
This commit is contained in:
parent
9c982d66e9
commit
36ed6f0a95
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue