Prerequisites
REPLICATE_API_KEY while the replicate client authenticates with REPLICATE_API_TOKEN.
The following example requires the replicate and openai libraries.
Example
The following agent will use Replicate to generate images or videos requested by the user.cookbook/91_tools/replicate_tools.py
Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | None | If you want to manually supply the Replicate API key. |
model | str | minimax/video-01 | The replicate model to use. Find out more on the Replicate platform. |
enable_generate_media | bool | True | Enable the generate_media functionality. |
all | bool | False | Enable all functionality. |
Toolkit Functions
| Function | Description |
|---|---|
generate_media | Generate either an image or a video from a prompt. The output depends on the model. |