Chat UI 文档

Cloudflare

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

Cloudflare

特性 可用
工具
多模态

您可以使用 Cloudflare Workers AI 通过无服务器推理来运行您自己的模型。

您需要拥有一个 Cloudflare 账户,然后获取您的账户 ID以及用于 Workers AI 的API 令牌

您可以在 .env.local 文件中直接使用 CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKEN 变量指定它们,也可以直接在端点配置中设置。

您可以在此处找到 Cloudflare 上可用的模型列表。

MODELS=`[
  {
    "name" : "nousresearch/hermes-2-pro-mistral-7b",
    "tokenizer": "nousresearch/hermes-2-pro-mistral-7b",
    "parameters": {
      "stop": ["<|im_end|>"]
    },
    "endpoints" : [
      {
        "type" : "cloudflare"
        <!-- optionally specify these
        "accountId": "your-account-id",
        "authToken": "your-api-token"
        -->
      }
    ]
  }
]`
< > 在 GitHub 上更新

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