From 15ccab5918502d4262bf852931563c7025b48d3a Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Fri, 20 Dec 2024 18:52:50 +0800 Subject: [PATCH 1/2] feat(agent):fix agent overrid bug --- dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py b/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py index fc0cf2755..411dd36b5 100644 --- a/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py +++ b/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py @@ -67,9 +67,10 @@ async def _load_thinking_messages( received_message: AgentMessage, sender: Agent, rely_messages: Optional[List[AgentMessage]] = None, + historical_dialogues: Optional[List[AgentMessage]] = None, context: Optional[Dict[str, Any]] = None, - is_retry_chat: Optional[bool] = False, - ) -> tuple[List[AgentMessage], Optional[Dict]]: + is_retry_chat: bool = False, + ) -> Tuple[List[AgentMessage], Optional[Dict]]: if rely_messages and len(rely_messages) > 0: return rely_messages[-1:], None else: From e08f996d5e02437d767906273fa70ddeb409f86f Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Sat, 21 Dec 2024 12:03:15 +0800 Subject: [PATCH 2/2] fix(agent): Fix agent history error --- dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py b/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py index 411dd36b5..3c5182b36 100644 --- a/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py +++ b/dbgpt/serve/agent/agents/expand/app_start_assisant_agent.py @@ -55,6 +55,7 @@ def prepare_act_param( received_message: Optional[AgentMessage], sender: Agent, rely_messages: Optional[List[AgentMessage]] = None, + **kwargs, ) -> Dict[str, Any]: return { "user_input": received_message.content,