Models
Mistral
Example
from phi.agent import Agent
from phi.llm.mistral import Mistral
agent = Agent(
llm=Mistral(model="mistral-large-latest"),
description="You help people with their health and fitness goals.",
)
agent.print_response("Share a 2 sentence quick and healthy breakfast recipe.", markdown=True)
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
2
Install libraries
pip install -U mistralai duckduckgo-search phidata
3
Export `MISTRAL_API_KEY`
export MISTRAL_API_KEY=xxx
4
Run Mistral Agent
python cookbook/llms/mistral/agent.py
Information
- View on Github