Commit 3afb0192 authored by John Wang's avatar John Wang

feat: change completion timeout to 10m

parent 64c48938
...@@ -2,7 +2,6 @@ import math ...@@ -2,7 +2,6 @@ import math
from typing import Optional from typing import Optional
from langchain import WikipediaAPIWrapper from langchain import WikipediaAPIWrapper
from langchain.callbacks.base import BaseCallbackHandler
from langchain.callbacks.manager import Callbacks from langchain.callbacks.manager import Callbacks
from langchain.memory.chat_memory import BaseChatMemory from langchain.memory.chat_memory import BaseChatMemory
from langchain.tools import BaseTool, Tool, WikipediaQueryRun from langchain.tools import BaseTool, Tool, WikipediaQueryRun
...@@ -58,7 +57,7 @@ class OrchestratorRuleParser: ...@@ -58,7 +57,7 @@ class OrchestratorRuleParser:
tenant_id=self.tenant_id, tenant_id=self.tenant_id,
model_name=agent_model_name, model_name=agent_model_name,
temperature=0, temperature=0,
max_tokens=1000, max_tokens=1500,
callbacks=[agent_callback, DifyStdOutCallbackHandler()] callbacks=[agent_callback, DifyStdOutCallbackHandler()]
) )
......
...@@ -227,8 +227,8 @@ class CompletionService: ...@@ -227,8 +227,8 @@ class CompletionService:
@classmethod @classmethod
def countdown_and_close(cls, worker_thread, pubsub, user, generate_task_id) -> threading.Thread: def countdown_and_close(cls, worker_thread, pubsub, user, generate_task_id) -> threading.Thread:
# wait for 5 minutes to close the thread # wait for 10 minutes to close the thread
timeout = 300 timeout = 600
def close_pubsub(): def close_pubsub():
sleep_iterations = 0 sleep_iterations = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment