Documentation Index
Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
Use this file to discover all available pages before exploring further.
ModelsLabs is a video generation tool that allows you to generate videos based on a text prompt.
Create a file models_labs_agent.py with the following code:
from phi.agent import Agent
from phi.tools.models_labs import ModelsLabs
# Create an Agent with the ModelsLabs tool
agent = Agent(tools=[ModelsLabs()], name="ModelsLabs Agent")
agent.print_response("Generate a video of a beautiful sunset over the ocean", markdown=True)
Usage
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
Set environment variables
export MODELS_LAB_API_KEY=****
Run the agent
python models_labs_agent.py