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

Authentication

Set your FIREWORKS_API_KEY environment variable.

export FIREWORKS_API_KEY=***

Usage

Use Fireworks with your Assistant:

from phi.assistant import Assistant
from phi.llm.fireworks import Fireworks

assistant = Assistant(
    llm=Fireworks(model="accounts/fireworks/models/firefunction-v1"),
    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: "Fireworks"

The name identifier for the assistant.

model
str
default: "accounts/fireworks/models/firefunction-v1"

The specific model ID used for generating responses.

api_key
str

The API key for authenticating requests to the service.

base_url
str
default: "https://api.fireworks.ai/inference/v1"

The base URL for making API requests to the service.