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(
482
482
question : str = received_message .content or ""
483
483
ai_message : str = llm_reply or ""
484
484
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
486
487
force_retry = False
487
488
if act_out is not None and act_out .force_retry :
488
489
await self .write_memories (
Original file line number Diff line number Diff line change @@ -63,14 +63,21 @@ def __init__(self, **kwargs):
63
63
64
64
@property
65
65
def desc (self ) -> Optional [str ]:
66
+ """Return desc of this agent."""
66
67
tools = _get_tools_by_resource (self .resource )
67
-
68
68
if tools is None or len (tools ) == 0 :
69
69
return "Has no tools to use"
70
70
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
+
71
77
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 )} "
74
81
)
75
82
76
83
You can’t perform that action at this time.
0 commit comments