Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -264,14 +264,11 @@ class BasicAgent:
|
|
| 264 |
self.max_iterations = max_iterations
|
| 265 |
|
| 266 |
# Descripción simplificada de herramientas para el prompt
|
| 267 |
-
tools_desc = "\n".join(
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
"tool:<tool_name>(arg1,arg2,...)\n\n"
|
| 271 |
-
"Available tools:\n"
|
| 272 |
-
f"{tools_desc}\n\n"
|
| 273 |
-
"Question: {{question}}\nAnswer:"
|
| 274 |
)
|
|
|
|
| 275 |
self.prompt_template = PromptTemplate.from_template(prompt_str)
|
| 276 |
self.chain = LLMChain(prompt=self.prompt_template, llm=self.llm)
|
| 277 |
|
|
|
|
| 264 |
self.max_iterations = max_iterations
|
| 265 |
|
| 266 |
# Descripción simplificada de herramientas para el prompt
|
| 267 |
+
tools_desc = "\n".join(
|
| 268 |
+
f"- {name}: {(func.__doc__ or 'No description available').strip().splitlines()[0]}"
|
| 269 |
+
for name, func in self.tools.items()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
)
|
| 271 |
+
|
| 272 |
self.prompt_template = PromptTemplate.from_template(prompt_str)
|
| 273 |
self.chain = LLMChain(prompt=self.prompt_template, llm=self.llm)
|
| 274 |
|