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.