> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fireworks

> 了解如何在 Agno 中使用 Fireworks 模型。

Fireworks 是一个为大型语言模型提供端点的平台。

## 身份验证

设置您的 `FIREWORKS_API_KEY` 环境变量。从[此处](https://fireworks.ai/account/api-keys)获取您的密钥。

<CodeGroup>
  ```bash Mac theme={null}
  export FIREWORKS_API_KEY=***
  ```

  ```bash Windows theme={null}
  setx FIREWORKS_API_KEY ***
  ```
</CodeGroup>

## 提示缓存

提示缓存将使用我们的 `Fireworks` 模型自动进行。您可以在[他们的文档](https://docs.fireworks.ai/guides/prompt-caching#using-prompt-caching)中了解更多关于 Fireworks 如何处理缓存的信息。

## 示例

将 `Fireworks` 与您的 `Agent` 一起使用：

<CodeGroup>
  ```python agent.py theme={null}
  from agno.agent import Agent, RunResponse
  from agno.models.fireworks import Fireworks

  agent = Agent(
      model=Fireworks(id="accounts/fireworks/models/firefunction-v2"),
      markdown=True
  )

  # 在终端打印响应
  agent.print_response("写一个两句话的恐怖故事。")

  ```
</CodeGroup>

<Note> 在[此处](../examples/models/fireworks)查看更多示例。 </Note>

## 参数

<Snippet file="model-fireworks-params.mdx" />

`Fireworks` 也支持 [OpenAI](/reference/models/openai) 的参数。
