timeout wait logner
This commit is contained in:
parent
e74a3685be
commit
157f4f9dc0
|
@ -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):
|
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):
|
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:
|
# if self.reply_in_thread:
|
||||||
# thread_content = await get_thread_content(self.client, self.room, self.event)
|
# 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
|
text_response = response = None
|
||||||
for i in range(openai_retries):
|
for i in range(openai_retries):
|
||||||
try:
|
try:
|
||||||
text_response, response = generate(timeout=5)
|
text_response, response = generate(timeout=20)
|
||||||
if text_response is not None and response is not None:
|
if text_response is not None and response is not None:
|
||||||
break
|
break
|
||||||
except stopit.utils.TimeoutException:
|
except stopit.utils.TimeoutException:
|
||||||
|
|
Loading…
Reference in New Issue