Commit b221f72c authored by John Wang's avatar John Wang

fix: use 16k model to summary context

parent 172fd22e
...@@ -31,6 +31,7 @@ class OrchestratorRuleParser: ...@@ -31,6 +31,7 @@ class OrchestratorRuleParser:
def __init__(self, tenant_id: str, app_model_config: AppModelConfig): def __init__(self, tenant_id: str, app_model_config: AppModelConfig):
self.tenant_id = tenant_id self.tenant_id = tenant_id
self.app_model_config = app_model_config self.app_model_config = app_model_config
self.agent_summary_model_name = "gpt-3.5-turbo-16k"
def to_agent_executor(self, conversation_message_task: ConversationMessageTask, memory: Optional[BaseChatMemory], def to_agent_executor(self, conversation_message_task: ConversationMessageTask, memory: Optional[BaseChatMemory],
rest_tokens: int, chain_callback: MainChainGatherCallbackHandler) \ rest_tokens: int, chain_callback: MainChainGatherCallbackHandler) \
...@@ -71,7 +72,7 @@ class OrchestratorRuleParser: ...@@ -71,7 +72,7 @@ class OrchestratorRuleParser:
summary_llm = LLMBuilder.to_llm( summary_llm = LLMBuilder.to_llm(
tenant_id=self.tenant_id, tenant_id=self.tenant_id,
model_name=agent_model_name, model_name=self.agent_summary_model_name,
temperature=0, temperature=0,
max_tokens=500, max_tokens=500,
callbacks=[DifyStdOutCallbackHandler()] callbacks=[DifyStdOutCallbackHandler()]
...@@ -80,7 +81,7 @@ class OrchestratorRuleParser: ...@@ -80,7 +81,7 @@ class OrchestratorRuleParser:
tools = self.to_tools( tools = self.to_tools(
tool_configs=tool_configs, tool_configs=tool_configs,
conversation_message_task=conversation_message_task, conversation_message_task=conversation_message_task,
model_name=agent_model_name, model_name=self.agent_summary_model_name,
rest_tokens=rest_tokens, rest_tokens=rest_tokens,
callbacks=[agent_callback, DifyStdOutCallbackHandler()] callbacks=[agent_callback, DifyStdOutCallbackHandler()]
) )
......
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