You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/examples/multiagents.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ manager_agent = CodeAgent(
169
169
That's all! Now let's run our system! We select a question that requires both some calculation and research:
170
170
171
171
```py
172
-
answer = manager_agent.run("If LLM trainings continue to scale up at the current rhythm until 2030, what would be the electric power in GW required to power the biggest training runs by 2030? What does that correspond to, compared to some contries? Please provide a source for any number used.")
172
+
answer = manager_agent.run("If LLM training continues to scale up at the current rhythm until 2030, what would be the electric power in GW required to power the biggest training runs by 2030? What would that correspond to, compared to some countries? Please provide a source for any numbers used.")
Copy file name to clipboardExpand all lines: docs/source/en/examples/rag.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ This agent will: ✅ Formulate the query itself and ✅ Critique to re-retrieve
29
29
30
30
So it should naively recover some advanced RAG techniques!
31
31
- Instead of directly using the user query as the reference in semantic search, the agent formulates itself a reference sentence that can be closer to the targeted documents, as in [HyDE](https://huggingface.co/papers/2212.10496).
32
-
The agent can the generated snippets and re-retrieve if needed, as in [Self-Query](https://docs.llamaindex.ai/en/stable/examples/evaluation/RetryQuery/).
32
+
The agent can use the generated snippets and re-retrieve if needed, as in [Self-Query](https://docs.llamaindex.ai/en/stable/examples/evaluation/RetryQuery/).
Copy file name to clipboardExpand all lines: docs/source/en/tutorials/building_good_agents.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,9 +233,9 @@ Here are the rules you should always follow to solve your task:
233
233
Now Begin! If you solve the task correctly, you will receive a reward of $1,000,000.
234
234
```
235
235
236
-
As yo can see, there are placeholders like `"{{tool_descriptions}}"`: these will be used upon agent initialization to insert certain automatically generated descriptions of tools or managed agents.
236
+
As you can see, there are placeholders like `"{{tool_descriptions}}"`: these will be used upon agent initialization to insert certain automatically generated descriptions of tools or managed agents.
237
237
238
-
So while you can overwrite this system prompt template by passing your custom prompt as an argument to the `system_prompt` parameter, your new system promptmust contain the following placeholders:
238
+
So while you can overwrite this system prompt template by passing your custom prompt as an argument to the `system_prompt` parameter, your new system prompt must contain the following placeholders:
239
239
-`"{{tool_descriptions}}"` to insert tool descriptions.
240
240
-`"{{managed_agents_description}}"` to insert the description for managed agents if there are any.
241
241
- For `CodeAgent` only: `"{{authorized_imports}}"` to insert the list of authorized imports.
Copy file name to clipboardExpand all lines: docs/source/en/tutorials/secure_code_execution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ This interpreter is designed for security by:
47
47
- Capping the number of operations to prevent infinite loops and resource bloating.
48
48
- Will not perform any operation that's not pre-defined.
49
49
50
-
Wev'e used this on many use cases, without ever observing any damage to the environment.
50
+
We've used this on many use cases, without ever observing any damage to the environment.
51
51
52
52
However this solution is not watertight: one could imagine occasions where LLMs fine-tuned for malignant actions could still hurt your environment. For instance if you've allowed an innocuous package like `Pillow` to process images, the LLM could generate thousands of saves of images to bloat your hard drive.
53
53
It's certainly not likely if you've chosen the LLM engine yourself, but it could happen.
@@ -79,4 +79,4 @@ agent = CodeAgent(
79
79
agent.run("What was Abraham Lincoln's preferred pet?")
80
80
```
81
81
82
-
E2B code execution is not compatible with multi-agents at the moment - because having an agent call in a code blob that should be executed remotely is a mess. But we're working on adding it!
82
+
E2B code execution is not compatible with multi-agents at the moment - because having an agent call in a code blob that should be executed remotely is a mess. But we're working on adding it!
For the push to Hub to work, your tool will need to respect some rules:
92
-
- All method are self-contained, e.g. use variables that come either from their args.
93
-
- As per the above point, **all imports should be defined directky within the tool's functions**, else you will get an error when trying to call [`~Tool.save`] or [`~Tool.push_to_hub`] with your custom tool.
92
+
- All methods are self-contained, e.g. use variables that come either from their args.
93
+
- As per the above point, **all imports should be defined directly within the tool's functions**, else you will get an error when trying to call [`~Tool.save`] or [`~Tool.push_to_hub`] with your custom tool.
94
94
- If you subclass the `__init__` method, you can give it no other argument than `self`. This is because arguments set during a specific tool instance's initialization are hard to track, which prevents from sharing them properly to the hub. And anyway, the idea of making a specific class is that you can already set class attributes for anything you need to hard-code (just set `your_variable=(...)` directly under the `class YourTool(Tool):` line). And of course you can still create a class attribute anywhere in your code by assigning stuff to `self.your_variable`.
95
95
96
96
@@ -210,7 +210,7 @@ Just make sure the new tool follows the same API as the replaced tool or adapt t
210
210
### Use a collection of tools
211
211
212
212
You can leverage tool collections by using the ToolCollection object, with the slug of the collection you want to use.
213
-
Then pass them as a list to initialize you agent, and start using them!
213
+
Then pass them as a list to initialize your agent, and start using them!
description="""Performs a duckduckgo web search based on your query (think a Google search) then returns the top search results as a list of dict elements.
150
-
Each result has keys 'title', 'href' and 'body'."""
149
+
description="""Performs a duckduckgo web search based on your query (think a Google search) then returns the top search results."""
151
150
inputs= {
152
151
"query": {"type": "string", "description": "The search query to perform."}
0 commit comments