[Workers AI] Undefined result for models that return binary output
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
Start at the client.ai.run entry point shown in the reproduction and trace how responses are handled for the binary-output model versus the base64-string model. Run the provided snippet against leonardo/phoenix-1.0 and confirm that the binary result is returned instead of undefined; add coverage for this behavior if the surrounding code has tests.
索引モデルが issue の本文から書いたものです。
説明
Confirm this is a Typescript library issue and not an underlying Cloudflare API issue
- This is an issue with the Typescript library
Describe the bug
Hello!
I can't tell if I'm holding the SDK wrong, but when I use the Typescript SDK to run a model like leonardo/phoenix-1.0 that, according to the docs, returns the following payload...
{
"type": "string",
"contentType": "image/jpeg",
"format": "binary",
"description": "The generated image in JPEG format"
}
...I get an undefined output. If I run a model that returns a base64 string (like schnell), I get back a JSON object that correctly reflects the type that's in the documentation.
What could I be doing wrong?
To Reproduce
Run this snippet:
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const output = await client.ai.run("@cf/leonardo/phoenix-1.0", {
prompt: "A cat eating soup dumplings",
account_id: process.env['CLOUDFLARE_ACCOUNT_ID']!,
})
console.log('Output type:', typeof output);
console.log('Output:', output);
Observe this output:
Output type: undefined
Output: undefined
Code snippets
OS
macOS
Runtime version
Typescript 5.7.3
Library version
v5.2.0
- 主要言語
- TypeScript
- スター
- 835
- フォーク
- 201
- 平均マージ
- 41分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/cloudflare-typescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cloudflare-typescript#2821 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
cloudflare/cloudflare-typescript#2811 ·
-
workers.scripts.deployments.list() paginates the wrong field in v7.2.0対応中かも @airshakur88 が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cloudflare/cloudflare-typescript#2805 · コメント 1 件 · リアクション 1 件 ·
-
Release Calendarオープン
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
cloudflare/cloudflare-typescript#2755 · コメント 7 件 · リアクション 1 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 15/100
cloudflare/cloudflare-typescript#2812 ·
cloudflare/cloudflare-typescript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
TriliumNext/Trilium#12837 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
LibreChat-AI/LibreChat#18944 ·
メンテナーはふだん 1 日以内に返信
-
bug root-cause:found
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
openchamber/openchamber#7620 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Anatomik5/codetovideo#8 ·
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信