Update render_tool_description method in XMLAgent.py
This commit is contained in:
parent
0c9126af4a
commit
6be88c6b0b
1 changed files with 8 additions and 1 deletions
|
|
@ -77,7 +77,14 @@ class XMLAgentComponent(CustomComponent):
|
||||||
raise ValueError("Prompt must contain 'input' key.")
|
raise ValueError("Prompt must contain 'input' key.")
|
||||||
|
|
||||||
def render_tool_description(tools):
|
def render_tool_description(tools):
|
||||||
return "\n".join([tool_template.format(name=tool.name, description=tool.description) for tool in tools])
|
return "\n".join(
|
||||||
|
[
|
||||||
|
tool_template.format(
|
||||||
|
name=tool.name, description=tool.description, args_schema=tool.args_schema, args=tool.args
|
||||||
|
)
|
||||||
|
for tool in tools
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
prompt_template = PromptTemplate.from_template(prompt)
|
prompt_template = PromptTemplate.from_template(prompt)
|
||||||
input_variables = prompt_template.input_variables
|
input_variables = prompt_template.input_variables
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue