Together is a platform for providing endpoints for Large Language models.

Authentication

Set your TOGETHER_API_KEY environment vairable.

export TOGETHER_API_KEY=***

Usage

Use Together with your Assistant:

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 quick healthy breakfast recipe.", markdown=True)

Params

name
str
default: "Together"

The name identifier for the assistant.

model
str
default: "mistralai/Mixtral-8x7B-Instruct-v0.1"

The specific model ID used for generating responses.

api_key
str

The API key used for authenticating requests to the service.

base_url
str

The base URL for making API requests to the service.