Skip to content

Commit ea9abb7

Browse files
committed
[Workers AI] Update output for text-to-image
1 parent 7084240 commit ea9abb7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pages/workers-ai/models/[name].astro

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,18 @@ const starlightPageProps = {
227227
<SchemaViewer schema={model.schema.input} />
228228

229229
<h3 id="Output">Output</h3>
230-
<SchemaViewer schema={model.schema.output} />
230+
{
231+
model.schema.output.format === "binary" ? (
232+
<>
233+
<p>
234+
The binding returns a <code>ReadableStream</code> with the image in
235+
PNG format.
236+
</p>
237+
</>
238+
) : (
239+
<SchemaViewer schema={model.schema.output} />
240+
)
241+
}
231242

232243
<h2 id="API Schemas">API Schemas</h2>
233244
<p>The following schemas are based on JSON Schema</p>

0 commit comments

Comments
 (0)