LLMs
Together
Example
cookbook/llms/together/assistant.py
from phi.assistant import Assistant
from phi.llm.together import Together
assistant = Assistant(
llm=Together(model="mistralai/Mixtral-8x7B-Instruct-v0.1"),
description="You help people with their health and fitness goals.",
)
assistant.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 openai phidata
3
Export `TOGETHER_API_KEY`
export TOGETHER_API_KEY=xxx
4
Run Together Assistant
python cookbook/llms/together/assistant.py
Information
- View on Github
Was this page helpful?