timeout wait logner

This commit is contained in:
Cyberes 2023-03-19 16:03:11 -06:00
parent e74a3685be
commit 157f4f9dc0
1 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ async def get_thread_content(client: AsyncClient, room: MatrixRoom, base_event:
async def process_chat(client, room, event, command, store, openai_obj: ModuleType, openai_model: str, openai_retries: int = 3, thread_root_id: str = None, system_prompt: str = None, log_full_response: bool = False, injected_system_prompt: str = False):
if not store.check_seen_event(event.event_id):
await client.room_typing(room.room_id, typing_state=True, timeout=3000)
await client.room_typing(room.room_id, typing_state=True, timeout=9000)
# if self.reply_in_thread:
# thread_content = await get_thread_content(self.client, self.room, self.event)
@ -167,7 +167,7 @@ async def process_chat(client, room, event, command, store, openai_obj: ModuleTy
text_response = response = None
for i in range(openai_retries):
try:
text_response, response = generate(timeout=5)
text_response, response = generate(timeout=20)
if text_response is not None and response is not None:
break
except stopit.utils.TimeoutException: