File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments