推理提供商文档

Fireworks AI

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

Fireworks AI

您可以在 这里 找到所有支持的 Fireworks AI 模型。

Fireworks AI 是一个以开发者为中心的平台,提供高性能的生成式 AI 解决方案,能够高效地部署和微调大型语言模型 (LLM) 和图像模型。

支持的任务

聊天补全 (LLM)

了解更多关于聊天补全 (LLM) 的信息,请点击这里

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.huggingface.co/v1",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3.2:fireworks-ai",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France?"
        }
    ],
)

print(completion.choices[0].message)

聊天补全 (VLM)

了解更多关于聊天补全 (VLM) 的信息,请点击这里

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.huggingface.co/v1",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="moonshotai/Kimi-K2.5:fireworks-ai",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Describe this image in one sentence."
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
                    }
                }
            ]
        }
    ],
)

print(completion.choices[0].message)
在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.