fix(reporter): 修复 reporter 智能体的模型加载异常
This commit is contained in:
parent
3885946a0d
commit
7c414521c9
@ -19,8 +19,6 @@ class ChatbotAgent(BaseAgent):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.graph = None
|
||||
self.checkpointer = None
|
||||
self.context_schema = Context
|
||||
|
||||
async def get_tools(self, tools: list[str] = None, mcps=None, knowledges=None):
|
||||
|
||||
@ -28,7 +28,7 @@ class SqlReporterAgent(BaseAgent):
|
||||
|
||||
# 创建 SqlReporterAgent
|
||||
graph = create_agent(
|
||||
model=load_chat_model(config.default_model), # 默认模型,会被 middleware 覆盖
|
||||
model=load_chat_model(context.model), # 使用 context 中的模型配置
|
||||
system_prompt=context.system_prompt,
|
||||
tools=await self.get_tools(),
|
||||
checkpointer=await self._get_checkpointer(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user