add_openai_integration #1
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": "system", "content": "You are a helpful assistant."},
|
||||||
{"role": "user", "content": question}
|
{"role": "user", "content": question}
|
||||||
],
|
],
|
||||||
max_tokens=150
|
max_tokens=150,
|
||||||
|
timeout=300
|
||||||
)
|
)
|
||||||
answer = response.choices[0].message.content.strip()
|
answer = response.choices[0].message.content.strip()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user