Skip to content

Commit

Permalink
Set timeout openai handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudryashov Lev committed Jul 27, 2023
1 parent 0ff4f6a commit eb3bc18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bread_bot/common/clients/openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def get_chatgpt_answer(self, query: str) -> str:
chat_completion = await openai.ChatCompletion.acreate(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": query}],
timeout=5 * 360,
timeout=60,
)
except OpenAIError as e:
logger.exception("ChatGPT service exception", exc_info=e)
Expand Down

0 comments on commit eb3bc18

Please sign in to comment.