added timeout / seems to be working
This commit is contained in:
3
main.py
3
main.py
@@ -80,7 +80,8 @@ async def message_callback(room: MatrixRoom, event: RoomMessageText):
|
||||
{"role": "system", "content": "You are a helpful assistant."},
|
||||
{"role": "user", "content": question}
|
||||
],
|
||||
max_tokens=150
|
||||
max_tokens=150,
|
||||
timeout=300
|
||||
)
|
||||
answer = response.choices[0].message.content.strip()
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user