Skip to content

Commit e920421

Browse files
author
cinjospeh
committed
fix format problem
1 parent a5aec91 commit e920421

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

dbgpt/agent/core/base_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ async def generate_reply(
482482
question: str = received_message.content or ""
483483
ai_message: str = llm_reply or ""
484484

485-
# force_retry means this reply do not complete, should reentry and do more things
485+
# force_retry means this reply do not complete
486+
# should reentry and do more things
486487
force_retry = False
487488
if act_out is not None and act_out.force_retry:
488489
await self.write_memories(

dbgpt/agent/expand/tool_assistant_agent.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,21 @@ def __init__(self, **kwargs):
6363

6464
@property
6565
def desc(self) -> Optional[str]:
66+
"""Return desc of this agent."""
6667
tools = _get_tools_by_resource(self.resource)
67-
6868
if tools is None or len(tools) == 0:
6969
return "Has no tools to use"
7070

71+
tools_desc_list = []
72+
for i in range(len(tools)):
73+
tool = tools[i]
74+
s = f"{i + 1}. tool {tool.name}, can {tool.description}."
75+
tools_desc_list.append(s)
76+
7177
return (
72-
"Can use the following tools to complete the task objectives, tool information: "
73-
f"{' '.join([f'{i+1}. tool {tools[i].name}, can {tools[i].description}.' for i in range(len(tools))])}"
78+
"Can use the following tools to complete the task objectives, "
79+
"tool information: "
80+
f"{' '.join(tools_desc_list)}"
7481
)
7582

7683

0 commit comments

Comments
 (0)