Example


from phi.agent import Agent
from phi.model.fireworks import Fireworks
from phi.tools.yfinance import YFinanceTools

agent = Agent(
    model=Fireworks(id="accounts/fireworks/models/firefunction-v2"),
    tools=[YFinanceTools(stock_price=True)],
    show_tool_calls=True,
    markdown=True,
)

agent.print_response("What is the stock price of NVDA and TSLA")

Fireworks Params

ParameterTypeDefaultDescription
idstr"accounts/fireworks/models/firefunction-v2"The specific model ID used for generating responses.
namestr"Fireworks: {id}"The name identifier for the agent. Defaults to "Fireworks: " followed by the model ID.
providerstr"Fireworks"The provider of the model.
api_keyOptional[str]-The API key for authenticating requests to the service. Retrieved from the environment variable FIREWORKS_API_KEY.
base_urlstr"https://api.fireworks.ai/inference/v1"The base URL for making API requests to the Fireworks service.

Fireworks is a subclass of the OpenAILike class and has access to the same params.