e2b details
This commit is contained in:
parent
e57f4f55ef
commit
82c374aa30
|
@ -24,7 +24,7 @@ In this guided visit, you will learn how to build an agent, how to run it, and h
|
|||
To initialize a minimal agent, you need at least these two arguments:
|
||||
|
||||
- An text-generation model to power your agent - because the agent is different from a simple LLM, it is a system that uses a LLM as its engine.
|
||||
- A list of tools from which the agent pick tools to execute
|
||||
- A list of tools - tools the agent can use to solve the task.
|
||||
|
||||
For your model, you can use any of these options:
|
||||
- [`TransformersModel`] takes a pre-initialized `transformers` pipeline to run inference on your local machine using `transformers`.
|
||||
|
@ -69,7 +69,7 @@ This gives you at the end of the agent run:
|
|||
```text
|
||||
'Hugging Face – Blog'
|
||||
```
|
||||
The execution will stop at any code trying to perform an illegal operation or if there is a regular Python error with the code generated by the agent. You can also use E2B code executor instead of a local Python interpreter by passing `use_e2b_executor=True` upon agent initialization.
|
||||
The execution will stop at any code trying to perform an illegal operation or if there is a regular Python error with the code generated by the agent. You can also use [E2B code executor](https://e2b.dev/docs#what-is-e2-b) instead of a local Python interpreter by first [setting the `E2B_API_KEY` environment variable](https://e2b.dev/dashboard?tab=keys) and then passing `use_e2b_executor=True` upon agent initialization.
|
||||
|
||||
> [!WARNING]
|
||||
> The LLM can generate arbitrary code that will then be executed: do not add any unsafe imports!
|
||||
|
|
Loading…
Reference in New Issue