Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

Meta のロゴ

bart-large-cnn

ベータ

要約 • Meta

Markdown で表示Agent セットアップ
  • Cloudflare ホスト
  • 非推奨

BART は、双方向(BERT ライク)のエンコーダーと自己回帰(GPT ライク)のデコーダーを備えた transformer encoder-encoder(seq2seq)モデルです。テキストの要約に使えます。

モデル情報
非推奨2026/5/30
ベータはい
単価$0.00 per M input tokens

使い方


export interface Env {
  AI: Ai;
}

export default {
  async fetch(request, env): Promise<Response> {
    const response = await env.AI.run("@cf/facebook/bart-large-cnn", {
      input_text: "Workers AI allows you to run machine learning models, on the Cloudflare network, from your own code – whether that be from Workers, Pages, or anywhere via the Cloudflare API. With the launch of Workers AI, Cloudflare is slowly rolling out GPUs to its global network. This enables you to build and deploy ambitious AI applications that run near your users, wherever they are.",
      max_length: 14
    });
    return Response.json(response);
  },
} satisfies ExportedHandler<Env>;

curl https://api.cloudflare.com/client/v4/accounts/{cf_account_id}/ai/run/@cf/facebook/bart-large-cnn \
  -H "Authorization: Bearer {cf_api_token}" \
  -d '{
    "input_text": "Workers AI allows you to run machine learning models, on the Cloudflare network, from your own code – whether that be from Workers, Pages, or anywhere via the Cloudflare API. With the launch of Workers AI, Cloudflare is slowly rolling out GPUs to its global network. This enables you to build and deploy ambitious AI applications that run near your users, wherever they are.",
    "max_length": 14
  }'

パラメーター

input_text
string必須minLength: 1モデルに要約させたいテキストです
max_length
integerデフォルト: 1024生成する要約の最大長(トークン)です
summary
string入力テキストの要約です

API スキーマ(Raw)

Input
Output

役に立ちましたか?