Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

Hugging Face Chat UI

最終更新 Markdown で表示Agent セットアップ

Workers AI を、Hugging Face が提供するオープンソースのチャット画面 Chat UI ↗ と組み合わせて使えます。

前提条件

次のものが必要です。

セットアップ

まず、Account ID と API トークンの指定方法を決めます。.env.local に CLOUDFLARE_ACCOUNT_ID と CLOUDFLARE_API_TOKEN を直接書くか、エンドポイント設定に含めます。

そのあと、Chat UI の GitHub リポジトリ ↗ の残りのセットアップ手順に従います。

モデルを設定するときは、cloudflare エンドポイントを指定します。

{
  "name" : "nousresearch/hermes-2-pro-mistral-7b",
  "tokenizer": "nousresearch/hermes-2-pro-mistral-7b",
  "parameters": {
    "stop": ["<|im_end|>"]
  },
  "endpoints" : [
    {
      "type": "cloudflare",
      // optionally specify these if not included in .env.local
      "accountId": "your-account-id",
      "apiToken": "your-api-token"
      //
    }
  ]
}

対応モデル

このテンプレートは、@hf パラメーターで始まる任意の テキスト生成モデル で使えます。

役に立ちましたか?