Skip to content

Commit

Permalink
fix format problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cinjospeh committed Jan 6, 2025
1 parent a5aec91 commit e920421
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dbgpt/agent/core/base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ async def generate_reply(
question: str = received_message.content or ""
ai_message: str = llm_reply or ""

# force_retry means this reply do not complete, should reentry and do more things
# force_retry means this reply do not complete
# should reentry and do more things
force_retry = False
if act_out is not None and act_out.force_retry:
await self.write_memories(
Expand Down
13 changes: 10 additions & 3 deletions dbgpt/agent/expand/tool_assistant_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,21 @@ def __init__(self, **kwargs):

@property
def desc(self) -> Optional[str]:
"""Return desc of this agent."""
tools = _get_tools_by_resource(self.resource)

if tools is None or len(tools) == 0:
return "Has no tools to use"

tools_desc_list = []
for i in range(len(tools)):
tool = tools[i]
s = f"{i + 1}. tool {tool.name}, can {tool.description}."
tools_desc_list.append(s)

return (
"Can use the following tools to complete the task objectives, tool information: "
f"{' '.join([f'{i+1}. tool {tools[i].name}, can {tools[i].description}.' for i in range(len(tools))])}"
"Can use the following tools to complete the task objectives, "
"tool information: "
f"{' '.join(tools_desc_list)}"
)


Expand Down

0 comments on commit e920421

Please sign in to comment.