Добавлен таймаут запросов к ИИ.
This commit is contained in:
parent
ab31d03464
commit
24ce709fb1
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ class AiMessage:
|
||||||
|
|
||||||
class AiAgent:
|
class AiAgent:
|
||||||
def __init__(self, api_token: str):
|
def __init__(self, api_token: str):
|
||||||
self.client = OpenRouter(api_key=api_token)
|
self.client = OpenRouter(api_key=api_token, timeout_ms=15000)
|
||||||
self.chat_contexts: Dict[int, ChatContext] = {}
|
self.chat_contexts: Dict[int, ChatContext] = {}
|
||||||
|
|
||||||
async def get_reply(self, chat_id: int, chat_prompt: str,
|
async def get_reply(self, chat_id: int, chat_prompt: str,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue