@opencode/ai 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -69
- package/dist/cache-policy.d.ts +1 -1
- package/dist/cache-policy.js +16 -4
- package/dist/decision-client.d.ts +3 -3
- package/dist/decision.d.ts +20 -125
- package/dist/decision.js +25 -15
- package/dist/effect.d.ts +4 -15
- package/dist/effect.js +2 -6
- package/dist/effort-updates.d.ts +3 -3
- package/dist/effort-updates.js +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +7 -3
- package/dist/experimental/cloudflare-run-extraction.js +4 -1
- package/dist/experimental/extraction.d.ts +10 -40
- package/dist/experimental/extraction.js +14 -13
- package/dist/experimental.d.ts +8 -8
- package/dist/experimental.js +4 -4
- package/dist/generation.d.ts +0 -2
- package/dist/generation.js +2 -2
- package/dist/image-client.d.ts +13 -7
- package/dist/image-client.js +1 -1
- package/dist/image.d.ts +357 -464
- package/dist/image.js +17 -15
- package/dist/index.d.ts +28 -465
- package/dist/index.js +18 -17
- package/dist/llm.d.ts +65 -266
- package/dist/llm.js +101 -92
- package/dist/loop.d.ts +38 -0
- package/dist/loop.js +136 -0
- package/dist/media-model.d.ts +1 -1
- package/dist/media-model.js +8 -6
- package/dist/media.d.ts +9 -0
- package/dist/media.js +37 -2
- package/dist/protocols/alibaba-chat.d.ts +5 -1
- package/dist/protocols/alibaba-chat.js +3 -3
- package/dist/protocols/alibaba-images.d.ts +2 -2
- package/dist/protocols/alibaba-messages.js +3 -3
- package/dist/protocols/alibaba-responses.js +8 -20
- package/dist/protocols/anthropic-messages.d.ts +1 -1
- package/dist/protocols/anthropic-messages.js +54 -173
- package/dist/protocols/assemblyai-transcription.d.ts +2 -2
- package/dist/protocols/bedrock-converse.js +10 -16
- package/dist/protocols/cartesia-speech.d.ts +2 -2
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +2 -2
- package/dist/protocols/cohere-chat.js +9 -12
- package/dist/protocols/deepgram-speech.d.ts +2 -2
- package/dist/protocols/deepgram-transcription.d.ts +2 -2
- package/dist/protocols/elevenlabs-speech.d.ts +2 -2
- package/dist/protocols/elevenlabs-transcription.d.ts +2 -2
- package/dist/protocols/gemini.d.ts +3 -0
- package/dist/protocols/gemini.js +54 -72
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-interactions.d.ts +3 -4
- package/dist/protocols/google-interactions.js +44 -30
- package/dist/protocols/google-speech.d.ts +2 -2
- package/dist/protocols/google-transcription.d.ts +2 -2
- package/dist/protocols/google-video.d.ts +2 -2
- package/dist/protocols/meta-images.d.ts +2 -2
- package/dist/protocols/meta-responses.js +26 -23
- package/dist/protocols/minimax-images.d.ts +2 -2
- package/dist/protocols/mistral-chat.js +7 -10
- package/dist/protocols/open-responses-channel.js +6 -19
- package/dist/protocols/open-responses-continuation.d.ts +1 -5
- package/dist/protocols/open-responses-continuation.js +1 -3
- package/dist/protocols/open-responses.d.ts +1 -21
- package/dist/protocols/open-responses.js +10 -15
- package/dist/protocols/openai-chat.d.ts +3 -23
- package/dist/protocols/openai-chat.js +26 -47
- package/dist/protocols/openai-compatible-chat.d.ts +1 -1
- package/dist/protocols/openai-compatible-responses.d.ts +2 -2
- package/dist/protocols/openai-compatible-responses.js +1 -1
- package/dist/protocols/openai-decisions.js +1 -1
- package/dist/protocols/openai-images.d.ts +2 -2
- package/dist/protocols/openai-responses.js +10 -29
- package/dist/protocols/openai-speech.d.ts +2 -2
- package/dist/protocols/openai-transcription.d.ts +2 -2
- package/dist/protocols/runway-video.d.ts +2 -2
- package/dist/protocols/shared.d.ts +1 -4
- package/dist/protocols/shared.js +13 -11
- package/dist/protocols/system-one.d.ts +4 -4
- package/dist/protocols/utils/bedrock-cache.js +2 -5
- package/dist/protocols/utils/bedrock-media.d.ts +0 -3
- package/dist/protocols/utils/cache.d.ts +3 -0
- package/dist/protocols/utils/cache.js +15 -2
- package/dist/protocols/utils/image-sizing.d.ts +1 -1
- package/dist/protocols/utils/responses-checkpoint.js +1 -1
- package/dist/protocols/utils/responses-compaction.d.ts +1 -1
- package/dist/protocols/utils/responses-compaction.js +6 -5
- package/dist/protocols/utils/responses-hosted-tools.d.ts +97 -1
- package/dist/protocols/utils/responses-hosted-tools.js +31 -0
- package/dist/protocols/utils/tool-stream.d.ts +5 -271
- package/dist/protocols/utils/tool-stream.js +3 -13
- package/dist/protocols/venice-chat.d.ts +3 -1
- package/dist/protocols/venice-chat.js +4 -4
- package/dist/protocols/xai-images.d.ts +2 -2
- package/dist/protocols/xai-responses.js +5 -25
- package/dist/protocols/xai-video.d.ts +2 -2
- package/dist/protocols/zai-chat.d.ts +5 -1
- package/dist/protocols/zai-chat.js +1 -1
- package/dist/protocols/zai-images.d.ts +2 -2
- package/dist/protocols/zai-messages.js +3 -3
- package/dist/provider-error.d.ts +0 -1
- package/dist/provider-error.js +7 -80
- package/dist/providers/alibaba.d.ts +67 -4
- package/dist/providers/alibaba.js +6 -1
- package/dist/providers/amazon-bedrock-mantle.d.ts +6 -3
- package/dist/providers/amazon-bedrock-mantle.js +6 -3
- package/dist/providers/amazon-bedrock.d.ts +6 -7
- package/dist/providers/amazon-bedrock.js +1 -1
- package/dist/providers/anthropic-compatible.d.ts +7 -8
- package/dist/providers/anthropic-compatible.js +2 -5
- package/dist/providers/anthropic.d.ts +8 -9
- package/dist/providers/anthropic.js +2 -7
- package/dist/providers/assemblyai.d.ts +2 -2
- package/dist/providers/assemblyai.js +2 -7
- package/dist/providers/azure/messages.d.ts +2 -0
- package/dist/providers/azure/messages.js +1 -0
- package/dist/providers/azure.d.ts +322 -7
- package/dist/providers/azure.js +25 -9
- package/dist/providers/baseten.d.ts +5 -5
- package/dist/providers/baseten.js +7 -21
- package/dist/providers/cartesia.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +5 -5
- package/dist/providers/cerebras.js +4 -15
- package/dist/providers/cloudflare-ai-gateway.d.ts +21 -13
- package/dist/providers/cloudflare-ai-gateway.js +28 -40
- package/dist/providers/cloudflare-shared.d.ts +9 -0
- package/dist/providers/cloudflare-shared.js +25 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +4 -4
- package/dist/providers/cloudflare-workers-ai.js +4 -20
- package/dist/providers/cohere/chat.js +2 -7
- package/dist/providers/cohere.d.ts +6 -5
- package/dist/providers/cohere.js +7 -13
- package/dist/providers/deepgram.d.ts +2 -2
- package/dist/providers/deepgram.js +2 -7
- package/dist/providers/deepinfra.d.ts +5 -5
- package/dist/providers/deepinfra.js +5 -13
- package/dist/providers/deepseek.d.ts +5 -5
- package/dist/providers/deepseek.js +3 -14
- package/dist/providers/digitalocean.d.ts +8 -5
- package/dist/providers/digitalocean.js +13 -14
- package/dist/providers/elevenlabs.d.ts +2 -2
- package/dist/providers/elevenlabs.js +2 -7
- package/dist/providers/fireworks.d.ts +5 -5
- package/dist/providers/fireworks.js +4 -15
- package/dist/providers/google/interactions.d.ts +1 -1
- package/dist/providers/google/interactions.js +2 -7
- package/dist/providers/google-vertex-chat.d.ts +3 -3
- package/dist/providers/google-vertex-chat.js +3 -29
- package/dist/providers/google-vertex-interactions.d.ts +3 -3
- package/dist/providers/google-vertex-messages.d.ts +3 -3
- package/dist/providers/google-vertex-messages.js +3 -29
- package/dist/providers/google-vertex-mistral.d.ts +3 -3
- package/dist/providers/google-vertex-mistral.js +3 -29
- package/dist/providers/google-vertex-responses.d.ts +3 -3
- package/dist/providers/google-vertex-responses.js +4 -30
- package/dist/providers/google-vertex-shared.d.ts +31 -0
- package/dist/providers/google-vertex-shared.js +25 -0
- package/dist/providers/google-vertex.d.ts +3 -3
- package/dist/providers/google.d.ts +15 -13
- package/dist/providers/google.js +9 -19
- package/dist/providers/groq.d.ts +5 -5
- package/dist/providers/groq.js +4 -15
- package/dist/providers/meta.d.ts +5 -5
- package/dist/providers/meta.js +10 -23
- package/dist/providers/minimax/chat.js +2 -7
- package/dist/providers/minimax/responses.js +2 -7
- package/dist/providers/minimax.d.ts +5 -5
- package/dist/providers/minimax.js +7 -22
- package/dist/providers/mistral.d.ts +10 -11
- package/dist/providers/mistral.js +3 -14
- package/dist/providers/moonshot/messages.js +2 -7
- package/dist/providers/moonshot/responses.js +2 -7
- package/dist/providers/moonshot.d.ts +5 -5
- package/dist/providers/moonshot.js +4 -16
- package/dist/providers/openai-compatible-responses.d.ts +6 -7
- package/dist/providers/openai-compatible-responses.js +2 -8
- package/dist/providers/openai-compatible.d.ts +6 -7
- package/dist/providers/openai-compatible.js +4 -10
- package/dist/providers/openai.d.ts +4 -4
- package/dist/providers/openai.js +3 -3
- package/dist/providers/opencode.d.ts +4 -4
- package/dist/providers/opencode.js +6 -2
- package/dist/providers/openrouter.d.ts +8 -5
- package/dist/providers/openrouter.js +16 -24
- package/dist/providers/runway.d.ts +1 -1
- package/dist/providers/settings.d.ts +40 -0
- package/dist/providers/settings.js +19 -0
- package/dist/providers/togetherai.d.ts +5 -5
- package/dist/providers/togetherai.js +5 -15
- package/dist/providers/typesafe-ai.d.ts +4 -4
- package/dist/providers/typesafe-ai.js +6 -2
- package/dist/providers/venice.d.ts +4 -4
- package/dist/providers/venice.js +6 -2
- package/dist/providers/vercel-ai-gateway.d.ts +5 -5
- package/dist/providers/vercel-ai-gateway.js +15 -28
- package/dist/providers/xai.d.ts +4 -4
- package/dist/providers/xai.js +4 -12
- package/dist/providers/zai-coding-plan/messages.js +2 -7
- package/dist/providers/zai-coding-plan/responses.js +2 -7
- package/dist/providers/zai-coding-plan.d.ts +5 -5
- package/dist/providers/zai-coding-plan.js +8 -15
- package/dist/providers/zai.d.ts +5 -5
- package/dist/providers/zai.js +10 -22
- package/dist/public.d.ts +12 -0
- package/dist/public.js +5 -0
- package/dist/route/auth-options.d.ts +9 -5
- package/dist/route/auth-options.js +10 -7
- package/dist/route/client.d.ts +50 -37
- package/dist/route/client.js +42 -53
- package/dist/route/decision.d.ts +8 -8
- package/dist/route/decision.js +3 -3
- package/dist/route/executor.d.ts +5 -0
- package/dist/route/executor.js +10 -0
- package/dist/route/index.d.ts +5 -7
- package/dist/route/index.js +1 -1
- package/dist/route/media.d.ts +7 -11
- package/dist/route/media.js +22 -26
- package/dist/route/transport/http.js +6 -5
- package/dist/route/transport/websocket.js +7 -1
- package/dist/schema/errors.d.ts +16 -17
- package/dist/schema/errors.js +63 -12
- package/dist/schema/events.d.ts +2563 -2954
- package/dist/schema/events.js +54 -109
- package/dist/schema/messages.d.ts +194 -137
- package/dist/schema/messages.js +66 -83
- package/dist/schema/options.d.ts +112 -65
- package/dist/schema/options.js +52 -101
- package/dist/speech-client.d.ts +7 -7
- package/dist/speech.d.ts +306 -316
- package/dist/speech.js +16 -14
- package/dist/testing.d.ts +31 -175
- package/dist/testing.js +60 -5
- package/dist/tool-history.d.ts +1 -1
- package/dist/tool-history.js +3 -10
- package/dist/tool-runtime.d.ts +9 -2
- package/dist/tool-runtime.js +17 -31
- package/dist/tool.d.ts +39 -43
- package/dist/tool.js +16 -26
- package/dist/transcription-client.d.ts +7 -7
- package/dist/transcription.d.ts +314 -265
- package/dist/transcription.js +16 -14
- package/dist/utils/provider-codes.d.ts +3 -0
- package/dist/utils/provider-codes.js +41 -0
- package/dist/video-client.d.ts +7 -7
- package/dist/video-client.js +1 -1
- package/dist/video.d.ts +269 -287
- package/dist/video.js +16 -14
- package/package.json +9 -9
- package/dist/experimental/testing.d.ts +0 -3
- package/dist/experimental/testing.js +0 -3
- package/dist/testing/decision.d.ts +0 -16
- package/dist/testing/decision.js +0 -20
- package/dist/testing/image.d.ts +0 -14
- package/dist/testing/image.js +0 -12
- package/dist/testing/media.d.ts +0 -18
- package/dist/testing/media.js +0 -36
- package/dist/testing/script.d.ts +0 -28
- package/dist/testing/script.js +0 -60
- package/dist/testing/speech.d.ts +0 -14
- package/dist/testing/speech.js +0 -12
- package/dist/testing/transcription.d.ts +0 -14
- package/dist/testing/transcription.js +0 -12
- package/dist/testing/video.d.ts +0 -14
- package/dist/testing/video.js +0 -12
package/dist/image.d.ts
CHANGED
|
@@ -3,16 +3,16 @@ import { Generation, type AwaitOptions } from "./generation.js";
|
|
|
3
3
|
import { Media } from "./media.js";
|
|
4
4
|
import { MediaModel } from "./media-model.js";
|
|
5
5
|
import { MediaRoute } from "./route/media.js";
|
|
6
|
-
import { AIError,
|
|
6
|
+
import { AIError, type OpenString, type BaseRequest } from "./schema/index.js";
|
|
7
7
|
import { Service } from "./image-client.js";
|
|
8
8
|
export type ImageOptions = MediaModel.Options;
|
|
9
|
-
export type ImageRoute = MediaRoute.AnyRoute<
|
|
9
|
+
export type ImageRoute = MediaRoute.AnyRoute<ImageRequest, ImageEvent, ImageResponse>;
|
|
10
10
|
export declare class ImageModel<Options extends ImageOptions = ImageOptions> extends MediaModel<ImageRoute, Options> {
|
|
11
11
|
protected readonly _ImageModel: void;
|
|
12
12
|
/** The number of type arguments selects the kind: `<Options>`, `<Options, Frame, State>`, or `<Options, Token>`. */
|
|
13
|
-
static fromRoute<Options extends ImageOptions>(route: MediaModel.InlineRouteInput<
|
|
14
|
-
static fromRoute<Options extends ImageOptions, Frame, State>(route: MediaModel.StreamRouteInput<
|
|
15
|
-
static fromRoute<Options extends ImageOptions, Token>(route: MediaModel.QueuedRouteInput<
|
|
13
|
+
static fromRoute<Options extends ImageOptions>(route: MediaModel.InlineRouteInput<ImageRequest<ImageModel<Options>>, ImageResponse>, input: MediaRoute.ModelInput): ImageModel<Options>;
|
|
14
|
+
static fromRoute<Options extends ImageOptions, Frame, State>(route: MediaModel.StreamRouteInput<ImageRequest<ImageModel<Options>>, ImageEvent, Frame, State>, input: MediaRoute.ModelInput): ImageModel<Options>;
|
|
15
|
+
static fromRoute<Options extends ImageOptions, Token>(route: MediaModel.QueuedRouteInput<ImageRequest<ImageModel<Options>>, ImageResponse, Token>, input: MediaRoute.ModelInput): ImageModel<Options>;
|
|
16
16
|
}
|
|
17
17
|
export declare const ImageModelSchema: Schema.declare<ImageModel<{
|
|
18
18
|
readonly [x: string]: unknown;
|
|
@@ -23,64 +23,21 @@ export type ImageAspectRatio = Media.AspectRatio;
|
|
|
23
23
|
export declare const ImageAspectRatio: Schema.declare<`${number}:${number}`, `${number}:${number}`>;
|
|
24
24
|
/** Size tier: `1K` is about as many pixels as 1024×1024 at the requested aspect, `2K` as 2048×2048. */
|
|
25
25
|
export type ImageResolution = OpenString<"1K" | "2K" | "4K">;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}>, ImageModel<{
|
|
30
|
-
readonly [x: string]: unknown;
|
|
31
|
-
}>>;
|
|
32
|
-
readonly prompt: Schema.String;
|
|
26
|
+
/** A normalized image request, the plain object `ai.image.request(...)` returns. */
|
|
27
|
+
export interface ImageRequest<Model extends ImageModel = ImageModel> extends BaseRequest<Model, ImageModelOptions<Model>> {
|
|
28
|
+
readonly prompt: string;
|
|
33
29
|
/** Edit sources or style/subject references, in order. */
|
|
34
|
-
readonly images
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
readonly mediaType: Schema.String;
|
|
39
|
-
}>, Schema.Struct<{
|
|
40
|
-
readonly type: Schema.Literal<"base64">;
|
|
41
|
-
readonly data: Schema.String;
|
|
42
|
-
readonly mediaType: Schema.String;
|
|
43
|
-
}>, Schema.Struct<{
|
|
44
|
-
readonly type: Schema.Literal<"url">;
|
|
45
|
-
readonly url: Schema.String;
|
|
46
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
47
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
48
|
-
}>, Schema.Struct<{
|
|
49
|
-
readonly type: Schema.Literal<"ref">;
|
|
50
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
51
|
-
readonly id: Schema.String;
|
|
52
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
53
|
-
}>]>;
|
|
54
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
55
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
56
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
57
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
58
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
59
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
60
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
61
|
-
readonly format: Schema.optional<Schema.String>;
|
|
62
|
-
}>>;
|
|
63
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
64
|
-
}>, never, never>>>;
|
|
65
|
-
readonly n: Schema.optional<Schema.Int>;
|
|
66
|
-
readonly aspect: Schema.optional<Schema.declare<`${number}:${number}`, `${number}:${number}`>>;
|
|
67
|
-
readonly resolution: Schema.optional<Schema.String>;
|
|
68
|
-
readonly providerOptions: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
69
|
-
readonly http: Schema.optional<typeof HttpOptions>;
|
|
70
|
-
}>, {}>;
|
|
71
|
-
export declare class ImageRequest extends ImageRequest_base {
|
|
72
|
-
protected readonly _ImageRequest: void;
|
|
30
|
+
readonly images?: ReadonlyArray<Media.Asset>;
|
|
31
|
+
readonly n?: number;
|
|
32
|
+
readonly aspect?: ImageAspectRatio;
|
|
33
|
+
readonly resolution?: ImageResolution;
|
|
73
34
|
}
|
|
74
|
-
export type ImageRequestFor<Options extends ImageOptions = ImageOptions> = Omit<ImageRequest, "model" | "providerOptions"> & {
|
|
75
|
-
readonly model: ImageModel<Options>;
|
|
76
|
-
readonly providerOptions?: Options;
|
|
77
|
-
};
|
|
78
35
|
export type ImageModelOptions<Model> = Model extends ImageModel<infer Options> ? Options : never;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
36
|
+
/** Input accepted by `ai.image.request`, `generate`, `stream` and `start`. An `ImageRequest` is also a valid input. */
|
|
37
|
+
export type ImageRequestInput<Model extends ImageModel = ImageModel> = Omit<ImageRequest<Model>, "images" | "providerOptions"> & {
|
|
38
|
+
/** Edit sources or style/subject references, in order: assets or plain data with a detectable type. */
|
|
39
|
+
readonly images?: ReadonlyArray<Media.Input>;
|
|
82
40
|
readonly providerOptions?: NoInfer<ImageModelOptions<Model>>;
|
|
83
|
-
readonly http?: HttpOptions.Input;
|
|
84
41
|
};
|
|
85
42
|
declare const ImageResponse_base: Schema.Class<ImageResponse, Schema.Struct<{
|
|
86
43
|
readonly images: Schema.$Array<Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
@@ -688,105 +645,111 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
688
645
|
};
|
|
689
646
|
};
|
|
690
647
|
readonly match: {
|
|
691
|
-
<
|
|
692
|
-
readonly
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
readonly type: Schema.tag<"image-partial">;
|
|
701
|
-
readonly index: Schema.Number;
|
|
702
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
703
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
704
|
-
readonly type: Schema.Literal<"bytes">;
|
|
705
|
-
readonly data: Schema.Uint8Array;
|
|
706
|
-
readonly mediaType: Schema.String;
|
|
707
|
-
}>, Schema.Struct<{
|
|
708
|
-
readonly type: Schema.Literal<"base64">;
|
|
709
|
-
readonly data: Schema.String;
|
|
710
|
-
readonly mediaType: Schema.String;
|
|
711
|
-
}>, Schema.Struct<{
|
|
712
|
-
readonly type: Schema.Literal<"url">;
|
|
713
|
-
readonly url: Schema.String;
|
|
714
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
715
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
648
|
+
<Handlers extends { [K in "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"]: (value: {
|
|
649
|
+
readonly finish: Schema.Struct<{
|
|
650
|
+
readonly type: Schema.tag<"finish">;
|
|
651
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
652
|
+
readonly type: Schema.Literal<"tokens">;
|
|
653
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
654
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
655
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
656
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
716
657
|
}>, Schema.Struct<{
|
|
717
|
-
readonly type: Schema.Literal<"
|
|
718
|
-
readonly
|
|
719
|
-
readonly id: Schema.String;
|
|
720
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
721
|
-
}>]>;
|
|
722
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
723
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
724
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
725
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
726
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
727
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
728
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
729
|
-
readonly format: Schema.optional<Schema.String>;
|
|
730
|
-
}>>;
|
|
731
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
732
|
-
}>, never, never>;
|
|
733
|
-
}> | Schema.Struct<{
|
|
734
|
-
readonly type: Schema.tag<"image">;
|
|
735
|
-
readonly index: Schema.Number;
|
|
736
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
737
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
738
|
-
readonly type: Schema.Literal<"bytes">;
|
|
739
|
-
readonly data: Schema.Uint8Array;
|
|
740
|
-
readonly mediaType: Schema.String;
|
|
658
|
+
readonly type: Schema.Literal<"seconds">;
|
|
659
|
+
readonly seconds: Schema.Number;
|
|
741
660
|
}>, Schema.Struct<{
|
|
742
|
-
readonly type: Schema.Literal<"
|
|
743
|
-
readonly
|
|
744
|
-
readonly mediaType: Schema.String;
|
|
661
|
+
readonly type: Schema.Literal<"characters">;
|
|
662
|
+
readonly characters: Schema.Number;
|
|
745
663
|
}>, Schema.Struct<{
|
|
746
|
-
readonly type: Schema.Literal<"
|
|
747
|
-
readonly
|
|
748
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
749
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
664
|
+
readonly type: Schema.Literal<"credits">;
|
|
665
|
+
readonly credits: Schema.Number;
|
|
750
666
|
}>, Schema.Struct<{
|
|
751
|
-
readonly type: Schema.Literal<"
|
|
752
|
-
readonly
|
|
753
|
-
|
|
754
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
755
|
-
}>]>;
|
|
756
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
757
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
758
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
759
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
760
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
761
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
762
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
763
|
-
readonly format: Schema.optional<Schema.String>;
|
|
764
|
-
}>>;
|
|
667
|
+
readonly type: Schema.Literal<"compute">;
|
|
668
|
+
readonly seconds: Schema.Number;
|
|
669
|
+
}>]>>;
|
|
765
670
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
readonly
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
readonly
|
|
774
|
-
readonly
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
readonly
|
|
780
|
-
readonly
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
671
|
+
}>;
|
|
672
|
+
readonly "generation-progress": Schema.Struct<{
|
|
673
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
674
|
+
readonly id: Schema.String;
|
|
675
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
676
|
+
}>;
|
|
677
|
+
readonly "generation-queued": Schema.Struct<{
|
|
678
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
679
|
+
readonly id: Schema.String;
|
|
680
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
681
|
+
}>;
|
|
682
|
+
readonly image: Schema.Struct<{
|
|
683
|
+
readonly type: Schema.tag<"image">;
|
|
684
|
+
readonly index: Schema.Number;
|
|
685
|
+
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
686
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
687
|
+
readonly type: Schema.Literal<"bytes">;
|
|
688
|
+
readonly data: Schema.Uint8Array;
|
|
689
|
+
readonly mediaType: Schema.String;
|
|
690
|
+
}>, Schema.Struct<{
|
|
691
|
+
readonly type: Schema.Literal<"base64">;
|
|
692
|
+
readonly data: Schema.String;
|
|
693
|
+
readonly mediaType: Schema.String;
|
|
694
|
+
}>, Schema.Struct<{
|
|
695
|
+
readonly type: Schema.Literal<"url">;
|
|
696
|
+
readonly url: Schema.String;
|
|
697
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
698
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
699
|
+
}>, Schema.Struct<{
|
|
700
|
+
readonly type: Schema.Literal<"ref">;
|
|
701
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
702
|
+
readonly id: Schema.String;
|
|
703
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
704
|
+
}>]>;
|
|
705
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
706
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
707
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
708
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
709
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
710
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
711
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
712
|
+
readonly format: Schema.optional<Schema.String>;
|
|
713
|
+
}>>;
|
|
714
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
715
|
+
}>, never, never>;
|
|
716
|
+
}>;
|
|
717
|
+
readonly "image-partial": Schema.Struct<{
|
|
718
|
+
readonly type: Schema.tag<"image-partial">;
|
|
719
|
+
readonly index: Schema.Number;
|
|
720
|
+
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
721
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
722
|
+
readonly type: Schema.Literal<"bytes">;
|
|
723
|
+
readonly data: Schema.Uint8Array;
|
|
724
|
+
readonly mediaType: Schema.String;
|
|
725
|
+
}>, Schema.Struct<{
|
|
726
|
+
readonly type: Schema.Literal<"base64">;
|
|
727
|
+
readonly data: Schema.String;
|
|
728
|
+
readonly mediaType: Schema.String;
|
|
729
|
+
}>, Schema.Struct<{
|
|
730
|
+
readonly type: Schema.Literal<"url">;
|
|
731
|
+
readonly url: Schema.String;
|
|
732
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
733
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
734
|
+
}>, Schema.Struct<{
|
|
735
|
+
readonly type: Schema.Literal<"ref">;
|
|
736
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
737
|
+
readonly id: Schema.String;
|
|
738
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
739
|
+
}>]>;
|
|
740
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
741
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
742
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
743
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
744
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
745
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
746
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
747
|
+
readonly format: Schema.optional<Schema.String>;
|
|
748
|
+
}>>;
|
|
749
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
750
|
+
}>, never, never>;
|
|
751
|
+
}>;
|
|
752
|
+
}[K]["Type"]) => any; }>(value: {
|
|
790
753
|
readonly type: "image-partial";
|
|
791
754
|
readonly index: number;
|
|
792
755
|
readonly image: Media.Asset;
|
|
@@ -830,106 +793,112 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
830
793
|
readonly [x: string]: unknown;
|
|
831
794
|
};
|
|
832
795
|
} | undefined;
|
|
833
|
-
}, cases:
|
|
834
|
-
<
|
|
835
|
-
readonly
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
readonly type: Schema.tag<"image-partial">;
|
|
844
|
-
readonly index: Schema.Number;
|
|
845
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
846
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
847
|
-
readonly type: Schema.Literal<"bytes">;
|
|
848
|
-
readonly data: Schema.Uint8Array;
|
|
849
|
-
readonly mediaType: Schema.String;
|
|
796
|
+
}, cases: Handlers): import("effect/Unify").Unify<ReturnType<Handlers["finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"]>>;
|
|
797
|
+
<Handlers extends { [K in "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"]: (value: {
|
|
798
|
+
readonly finish: Schema.Struct<{
|
|
799
|
+
readonly type: Schema.tag<"finish">;
|
|
800
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
801
|
+
readonly type: Schema.Literal<"tokens">;
|
|
802
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
803
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
804
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
805
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
850
806
|
}>, Schema.Struct<{
|
|
851
|
-
readonly type: Schema.Literal<"
|
|
852
|
-
readonly
|
|
853
|
-
readonly mediaType: Schema.String;
|
|
854
|
-
}>, Schema.Struct<{
|
|
855
|
-
readonly type: Schema.Literal<"url">;
|
|
856
|
-
readonly url: Schema.String;
|
|
857
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
858
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
859
|
-
}>, Schema.Struct<{
|
|
860
|
-
readonly type: Schema.Literal<"ref">;
|
|
861
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
862
|
-
readonly id: Schema.String;
|
|
863
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
864
|
-
}>]>;
|
|
865
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
866
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
867
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
868
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
869
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
870
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
871
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
872
|
-
readonly format: Schema.optional<Schema.String>;
|
|
873
|
-
}>>;
|
|
874
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
875
|
-
}>, never, never>;
|
|
876
|
-
}> | Schema.Struct<{
|
|
877
|
-
readonly type: Schema.tag<"image">;
|
|
878
|
-
readonly index: Schema.Number;
|
|
879
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
880
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
881
|
-
readonly type: Schema.Literal<"bytes">;
|
|
882
|
-
readonly data: Schema.Uint8Array;
|
|
883
|
-
readonly mediaType: Schema.String;
|
|
807
|
+
readonly type: Schema.Literal<"seconds">;
|
|
808
|
+
readonly seconds: Schema.Number;
|
|
884
809
|
}>, Schema.Struct<{
|
|
885
|
-
readonly type: Schema.Literal<"
|
|
886
|
-
readonly
|
|
887
|
-
readonly mediaType: Schema.String;
|
|
810
|
+
readonly type: Schema.Literal<"characters">;
|
|
811
|
+
readonly characters: Schema.Number;
|
|
888
812
|
}>, Schema.Struct<{
|
|
889
|
-
readonly type: Schema.Literal<"
|
|
890
|
-
readonly
|
|
891
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
892
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
813
|
+
readonly type: Schema.Literal<"credits">;
|
|
814
|
+
readonly credits: Schema.Number;
|
|
893
815
|
}>, Schema.Struct<{
|
|
894
|
-
readonly type: Schema.Literal<"
|
|
895
|
-
readonly
|
|
896
|
-
|
|
897
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
898
|
-
}>]>;
|
|
899
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
900
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
901
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
902
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
903
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
904
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
905
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
906
|
-
readonly format: Schema.optional<Schema.String>;
|
|
907
|
-
}>>;
|
|
816
|
+
readonly type: Schema.Literal<"compute">;
|
|
817
|
+
readonly seconds: Schema.Number;
|
|
818
|
+
}>]>>;
|
|
908
819
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
readonly
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
readonly
|
|
917
|
-
readonly
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
readonly
|
|
923
|
-
readonly
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
820
|
+
}>;
|
|
821
|
+
readonly "generation-progress": Schema.Struct<{
|
|
822
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
823
|
+
readonly id: Schema.String;
|
|
824
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
825
|
+
}>;
|
|
826
|
+
readonly "generation-queued": Schema.Struct<{
|
|
827
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
828
|
+
readonly id: Schema.String;
|
|
829
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
830
|
+
}>;
|
|
831
|
+
readonly image: Schema.Struct<{
|
|
832
|
+
readonly type: Schema.tag<"image">;
|
|
833
|
+
readonly index: Schema.Number;
|
|
834
|
+
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
835
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
836
|
+
readonly type: Schema.Literal<"bytes">;
|
|
837
|
+
readonly data: Schema.Uint8Array;
|
|
838
|
+
readonly mediaType: Schema.String;
|
|
839
|
+
}>, Schema.Struct<{
|
|
840
|
+
readonly type: Schema.Literal<"base64">;
|
|
841
|
+
readonly data: Schema.String;
|
|
842
|
+
readonly mediaType: Schema.String;
|
|
843
|
+
}>, Schema.Struct<{
|
|
844
|
+
readonly type: Schema.Literal<"url">;
|
|
845
|
+
readonly url: Schema.String;
|
|
846
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
847
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
848
|
+
}>, Schema.Struct<{
|
|
849
|
+
readonly type: Schema.Literal<"ref">;
|
|
850
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
851
|
+
readonly id: Schema.String;
|
|
852
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
853
|
+
}>]>;
|
|
854
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
855
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
856
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
857
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
858
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
859
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
860
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
861
|
+
readonly format: Schema.optional<Schema.String>;
|
|
862
|
+
}>>;
|
|
863
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
864
|
+
}>, never, never>;
|
|
865
|
+
}>;
|
|
866
|
+
readonly "image-partial": Schema.Struct<{
|
|
867
|
+
readonly type: Schema.tag<"image-partial">;
|
|
868
|
+
readonly index: Schema.Number;
|
|
869
|
+
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
870
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
871
|
+
readonly type: Schema.Literal<"bytes">;
|
|
872
|
+
readonly data: Schema.Uint8Array;
|
|
873
|
+
readonly mediaType: Schema.String;
|
|
874
|
+
}>, Schema.Struct<{
|
|
875
|
+
readonly type: Schema.Literal<"base64">;
|
|
876
|
+
readonly data: Schema.String;
|
|
877
|
+
readonly mediaType: Schema.String;
|
|
878
|
+
}>, Schema.Struct<{
|
|
879
|
+
readonly type: Schema.Literal<"url">;
|
|
880
|
+
readonly url: Schema.String;
|
|
881
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
882
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
883
|
+
}>, Schema.Struct<{
|
|
884
|
+
readonly type: Schema.Literal<"ref">;
|
|
885
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
886
|
+
readonly id: Schema.String;
|
|
887
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
888
|
+
}>]>;
|
|
889
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
890
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
891
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
892
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
893
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
894
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
895
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
896
|
+
readonly format: Schema.optional<Schema.String>;
|
|
897
|
+
}>>;
|
|
898
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
899
|
+
}>, never, never>;
|
|
900
|
+
}>;
|
|
901
|
+
}[K]["Type"]) => any; }>(cases: Handlers): (value: {
|
|
933
902
|
readonly type: "image-partial";
|
|
934
903
|
readonly index: number;
|
|
935
904
|
readonly image: Media.Asset;
|
|
@@ -973,108 +942,10 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
973
942
|
readonly [x: string]: unknown;
|
|
974
943
|
};
|
|
975
944
|
} | undefined;
|
|
976
|
-
}) =>
|
|
945
|
+
}) => import("effect/Unify").Unify<ReturnType<Handlers["finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"]>>;
|
|
977
946
|
};
|
|
978
947
|
readonly matchOrElse: {
|
|
979
|
-
<
|
|
980
|
-
readonly type: Schema.tag<"generation-queued">;
|
|
981
|
-
readonly id: Schema.String;
|
|
982
|
-
readonly position: Schema.optional<Schema.Number>;
|
|
983
|
-
}> | Schema.Struct<{
|
|
984
|
-
readonly type: Schema.tag<"generation-progress">;
|
|
985
|
-
readonly id: Schema.String;
|
|
986
|
-
readonly progress: Schema.optional<Schema.Number>;
|
|
987
|
-
}> | Schema.Struct<{
|
|
988
|
-
readonly type: Schema.tag<"image-partial">;
|
|
989
|
-
readonly index: Schema.Number;
|
|
990
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
991
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
992
|
-
readonly type: Schema.Literal<"bytes">;
|
|
993
|
-
readonly data: Schema.Uint8Array;
|
|
994
|
-
readonly mediaType: Schema.String;
|
|
995
|
-
}>, Schema.Struct<{
|
|
996
|
-
readonly type: Schema.Literal<"base64">;
|
|
997
|
-
readonly data: Schema.String;
|
|
998
|
-
readonly mediaType: Schema.String;
|
|
999
|
-
}>, Schema.Struct<{
|
|
1000
|
-
readonly type: Schema.Literal<"url">;
|
|
1001
|
-
readonly url: Schema.String;
|
|
1002
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1003
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
1004
|
-
}>, Schema.Struct<{
|
|
1005
|
-
readonly type: Schema.Literal<"ref">;
|
|
1006
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
1007
|
-
readonly id: Schema.String;
|
|
1008
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1009
|
-
}>]>;
|
|
1010
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
1011
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
1012
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
1013
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
1014
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
1015
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
1016
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
1017
|
-
readonly format: Schema.optional<Schema.String>;
|
|
1018
|
-
}>>;
|
|
1019
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1020
|
-
}>, never, never>;
|
|
1021
|
-
}> | Schema.Struct<{
|
|
1022
|
-
readonly type: Schema.tag<"image">;
|
|
1023
|
-
readonly index: Schema.Number;
|
|
1024
|
-
readonly image: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
1025
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
1026
|
-
readonly type: Schema.Literal<"bytes">;
|
|
1027
|
-
readonly data: Schema.Uint8Array;
|
|
1028
|
-
readonly mediaType: Schema.String;
|
|
1029
|
-
}>, Schema.Struct<{
|
|
1030
|
-
readonly type: Schema.Literal<"base64">;
|
|
1031
|
-
readonly data: Schema.String;
|
|
1032
|
-
readonly mediaType: Schema.String;
|
|
1033
|
-
}>, Schema.Struct<{
|
|
1034
|
-
readonly type: Schema.Literal<"url">;
|
|
1035
|
-
readonly url: Schema.String;
|
|
1036
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1037
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
1038
|
-
}>, Schema.Struct<{
|
|
1039
|
-
readonly type: Schema.Literal<"ref">;
|
|
1040
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
1041
|
-
readonly id: Schema.String;
|
|
1042
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1043
|
-
}>]>;
|
|
1044
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
1045
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
1046
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
1047
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
1048
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
1049
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
1050
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
1051
|
-
readonly format: Schema.optional<Schema.String>;
|
|
1052
|
-
}>>;
|
|
1053
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1054
|
-
}>, never, never>;
|
|
1055
|
-
}> | Schema.Struct<{
|
|
1056
|
-
readonly type: Schema.tag<"finish">;
|
|
1057
|
-
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
1058
|
-
readonly type: Schema.Literal<"tokens">;
|
|
1059
|
-
readonly input: Schema.optional<Schema.Number>;
|
|
1060
|
-
readonly output: Schema.optional<Schema.Number>;
|
|
1061
|
-
readonly total: Schema.optional<Schema.Number>;
|
|
1062
|
-
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1063
|
-
}>, Schema.Struct<{
|
|
1064
|
-
readonly type: Schema.Literal<"seconds">;
|
|
1065
|
-
readonly seconds: Schema.Number;
|
|
1066
|
-
}>, Schema.Struct<{
|
|
1067
|
-
readonly type: Schema.Literal<"characters">;
|
|
1068
|
-
readonly characters: Schema.Number;
|
|
1069
|
-
}>, Schema.Struct<{
|
|
1070
|
-
readonly type: Schema.Literal<"credits">;
|
|
1071
|
-
readonly credits: Schema.Number;
|
|
1072
|
-
}>, Schema.Struct<{
|
|
1073
|
-
readonly type: Schema.Literal<"compute">;
|
|
1074
|
-
readonly seconds: Schema.Number;
|
|
1075
|
-
}>]>>;
|
|
1076
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1077
|
-
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial">]: never; }, OrElse extends (value: Exclude<{
|
|
948
|
+
<Handlers, OrElse>(value: {
|
|
1078
949
|
readonly type: "image-partial";
|
|
1079
950
|
readonly index: number;
|
|
1080
951
|
readonly image: Media.Asset;
|
|
@@ -1118,23 +989,81 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1118
989
|
readonly [x: string]: unknown;
|
|
1119
990
|
};
|
|
1120
991
|
} | undefined;
|
|
1121
|
-
},
|
|
992
|
+
}, cases: Handlers & {
|
|
993
|
+
readonly finish?: ((value: {
|
|
994
|
+
readonly type: "finish";
|
|
995
|
+
readonly usage?: {
|
|
996
|
+
readonly type: "seconds";
|
|
997
|
+
readonly seconds: number;
|
|
998
|
+
} | {
|
|
999
|
+
readonly type: "characters";
|
|
1000
|
+
readonly characters: number;
|
|
1001
|
+
} | {
|
|
1002
|
+
readonly type: "credits";
|
|
1003
|
+
readonly credits: number;
|
|
1004
|
+
} | {
|
|
1005
|
+
readonly type: "compute";
|
|
1006
|
+
readonly seconds: number;
|
|
1007
|
+
} | {
|
|
1008
|
+
readonly type: "tokens";
|
|
1009
|
+
readonly input?: number | undefined;
|
|
1010
|
+
readonly output?: number | undefined;
|
|
1011
|
+
readonly total?: number | undefined;
|
|
1012
|
+
readonly details?: {
|
|
1013
|
+
readonly [x: string]: unknown;
|
|
1014
|
+
} | undefined;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
readonly providerMetadata?: {
|
|
1017
|
+
readonly [x: string]: {
|
|
1018
|
+
readonly [x: string]: unknown;
|
|
1019
|
+
};
|
|
1020
|
+
} | undefined;
|
|
1021
|
+
}) => any) | undefined;
|
|
1022
|
+
readonly "generation-progress"?: ((value: {
|
|
1023
|
+
readonly type: "generation-progress";
|
|
1024
|
+
readonly id: string;
|
|
1025
|
+
readonly progress?: number | undefined;
|
|
1026
|
+
}) => any) | undefined;
|
|
1027
|
+
readonly "generation-queued"?: ((value: {
|
|
1028
|
+
readonly type: "generation-queued";
|
|
1029
|
+
readonly id: string;
|
|
1030
|
+
readonly position?: number | undefined;
|
|
1031
|
+
}) => any) | undefined;
|
|
1032
|
+
readonly image?: ((value: {
|
|
1033
|
+
readonly type: "image";
|
|
1034
|
+
readonly index: number;
|
|
1035
|
+
readonly image: Media.Asset;
|
|
1036
|
+
}) => any) | undefined;
|
|
1037
|
+
readonly "image-partial"?: ((value: {
|
|
1038
|
+
readonly type: "image-partial";
|
|
1039
|
+
readonly index: number;
|
|
1040
|
+
readonly image: Media.Asset;
|
|
1041
|
+
}) => any) | undefined;
|
|
1042
|
+
} & (Exclude<keyof Handlers, "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<{
|
|
1122
1043
|
readonly type: "image-partial";
|
|
1123
1044
|
readonly index: number;
|
|
1124
1045
|
readonly image: Media.Asset;
|
|
1125
|
-
}
|
|
1046
|
+
}, {
|
|
1047
|
+
readonly type: keyof Handlers;
|
|
1048
|
+
}> | Exclude<{
|
|
1126
1049
|
readonly type: "image";
|
|
1127
1050
|
readonly index: number;
|
|
1128
1051
|
readonly image: Media.Asset;
|
|
1129
|
-
}
|
|
1052
|
+
}, {
|
|
1053
|
+
readonly type: keyof Handlers;
|
|
1054
|
+
}> | Exclude<{
|
|
1130
1055
|
readonly type: "generation-queued";
|
|
1131
1056
|
readonly id: string;
|
|
1132
1057
|
readonly position?: number | undefined;
|
|
1133
|
-
}
|
|
1058
|
+
}, {
|
|
1059
|
+
readonly type: keyof Handlers;
|
|
1060
|
+
}> | Exclude<{
|
|
1134
1061
|
readonly type: "generation-progress";
|
|
1135
1062
|
readonly id: string;
|
|
1136
1063
|
readonly progress?: number | undefined;
|
|
1137
|
-
}
|
|
1064
|
+
}, {
|
|
1065
|
+
readonly type: keyof Handlers;
|
|
1066
|
+
}> | Exclude<{
|
|
1138
1067
|
readonly type: "finish";
|
|
1139
1068
|
readonly usage?: {
|
|
1140
1069
|
readonly type: "seconds";
|
|
@@ -1162,122 +1091,84 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1162
1091
|
readonly [x: string]: unknown;
|
|
1163
1092
|
};
|
|
1164
1093
|
} | undefined;
|
|
1165
|
-
},
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
readonly
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
readonly
|
|
1180
|
-
|
|
1181
|
-
readonly
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
readonly
|
|
1185
|
-
readonly
|
|
1186
|
-
|
|
1187
|
-
readonly
|
|
1188
|
-
readonly
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
readonly
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
readonly
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
readonly mediaType: Schema.String;
|
|
1220
|
-
}>, Schema.Struct<{
|
|
1221
|
-
readonly type: Schema.Literal<"url">;
|
|
1222
|
-
readonly url: Schema.String;
|
|
1223
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1224
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
1225
|
-
}>, Schema.Struct<{
|
|
1226
|
-
readonly type: Schema.Literal<"ref">;
|
|
1227
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
1228
|
-
readonly id: Schema.String;
|
|
1229
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
1230
|
-
}>]>;
|
|
1231
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
1232
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
1233
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
1234
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
1235
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
1236
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
1237
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
1238
|
-
readonly format: Schema.optional<Schema.String>;
|
|
1239
|
-
}>>;
|
|
1240
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1241
|
-
}>, never, never>;
|
|
1242
|
-
}> | Schema.Struct<{
|
|
1243
|
-
readonly type: Schema.tag<"finish">;
|
|
1244
|
-
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
1245
|
-
readonly type: Schema.Literal<"tokens">;
|
|
1246
|
-
readonly input: Schema.optional<Schema.Number>;
|
|
1247
|
-
readonly output: Schema.optional<Schema.Number>;
|
|
1248
|
-
readonly total: Schema.optional<Schema.Number>;
|
|
1249
|
-
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1250
|
-
}>, Schema.Struct<{
|
|
1251
|
-
readonly type: Schema.Literal<"seconds">;
|
|
1252
|
-
readonly seconds: Schema.Number;
|
|
1253
|
-
}>, Schema.Struct<{
|
|
1254
|
-
readonly type: Schema.Literal<"characters">;
|
|
1255
|
-
readonly characters: Schema.Number;
|
|
1256
|
-
}>, Schema.Struct<{
|
|
1257
|
-
readonly type: Schema.Literal<"credits">;
|
|
1258
|
-
readonly credits: Schema.Number;
|
|
1259
|
-
}>, Schema.Struct<{
|
|
1260
|
-
readonly type: Schema.Literal<"compute">;
|
|
1261
|
-
readonly seconds: Schema.Number;
|
|
1262
|
-
}>]>>;
|
|
1263
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1264
|
-
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial">]: never; }, OrElse extends (value: Exclude<{
|
|
1094
|
+
}, {
|
|
1095
|
+
readonly type: keyof Handlers;
|
|
1096
|
+
}>) => any)): import("effect/Unify").Unify<{ [K in keyof Handlers]-?: NonNullable<Handlers[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Handlers] | (OrElse extends (...args: Array<any>) => infer R ? R : never)>;
|
|
1097
|
+
<Handlers, OrElse>(cases: Handlers & {
|
|
1098
|
+
readonly finish?: ((value: {
|
|
1099
|
+
readonly type: "finish";
|
|
1100
|
+
readonly usage?: {
|
|
1101
|
+
readonly type: "seconds";
|
|
1102
|
+
readonly seconds: number;
|
|
1103
|
+
} | {
|
|
1104
|
+
readonly type: "characters";
|
|
1105
|
+
readonly characters: number;
|
|
1106
|
+
} | {
|
|
1107
|
+
readonly type: "credits";
|
|
1108
|
+
readonly credits: number;
|
|
1109
|
+
} | {
|
|
1110
|
+
readonly type: "compute";
|
|
1111
|
+
readonly seconds: number;
|
|
1112
|
+
} | {
|
|
1113
|
+
readonly type: "tokens";
|
|
1114
|
+
readonly input?: number | undefined;
|
|
1115
|
+
readonly output?: number | undefined;
|
|
1116
|
+
readonly total?: number | undefined;
|
|
1117
|
+
readonly details?: {
|
|
1118
|
+
readonly [x: string]: unknown;
|
|
1119
|
+
} | undefined;
|
|
1120
|
+
} | undefined;
|
|
1121
|
+
readonly providerMetadata?: {
|
|
1122
|
+
readonly [x: string]: {
|
|
1123
|
+
readonly [x: string]: unknown;
|
|
1124
|
+
};
|
|
1125
|
+
} | undefined;
|
|
1126
|
+
}) => any) | undefined;
|
|
1127
|
+
readonly "generation-progress"?: ((value: {
|
|
1128
|
+
readonly type: "generation-progress";
|
|
1129
|
+
readonly id: string;
|
|
1130
|
+
readonly progress?: number | undefined;
|
|
1131
|
+
}) => any) | undefined;
|
|
1132
|
+
readonly "generation-queued"?: ((value: {
|
|
1133
|
+
readonly type: "generation-queued";
|
|
1134
|
+
readonly id: string;
|
|
1135
|
+
readonly position?: number | undefined;
|
|
1136
|
+
}) => any) | undefined;
|
|
1137
|
+
readonly image?: ((value: {
|
|
1138
|
+
readonly type: "image";
|
|
1139
|
+
readonly index: number;
|
|
1140
|
+
readonly image: Media.Asset;
|
|
1141
|
+
}) => any) | undefined;
|
|
1142
|
+
readonly "image-partial"?: ((value: {
|
|
1143
|
+
readonly type: "image-partial";
|
|
1144
|
+
readonly index: number;
|
|
1145
|
+
readonly image: Media.Asset;
|
|
1146
|
+
}) => any) | undefined;
|
|
1147
|
+
} & (Exclude<keyof Handlers, "finish" | "generation-progress" | "generation-queued" | "image" | "image-partial"> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<{
|
|
1265
1148
|
readonly type: "image-partial";
|
|
1266
1149
|
readonly index: number;
|
|
1267
1150
|
readonly image: Media.Asset;
|
|
1268
|
-
}
|
|
1151
|
+
}, {
|
|
1152
|
+
readonly type: keyof Handlers;
|
|
1153
|
+
}> | Exclude<{
|
|
1269
1154
|
readonly type: "image";
|
|
1270
1155
|
readonly index: number;
|
|
1271
1156
|
readonly image: Media.Asset;
|
|
1272
|
-
}
|
|
1157
|
+
}, {
|
|
1158
|
+
readonly type: keyof Handlers;
|
|
1159
|
+
}> | Exclude<{
|
|
1273
1160
|
readonly type: "generation-queued";
|
|
1274
1161
|
readonly id: string;
|
|
1275
1162
|
readonly position?: number | undefined;
|
|
1276
|
-
}
|
|
1163
|
+
}, {
|
|
1164
|
+
readonly type: keyof Handlers;
|
|
1165
|
+
}> | Exclude<{
|
|
1277
1166
|
readonly type: "generation-progress";
|
|
1278
1167
|
readonly id: string;
|
|
1279
1168
|
readonly progress?: number | undefined;
|
|
1280
|
-
}
|
|
1169
|
+
}, {
|
|
1170
|
+
readonly type: keyof Handlers;
|
|
1171
|
+
}> | Exclude<{
|
|
1281
1172
|
readonly type: "finish";
|
|
1282
1173
|
readonly usage?: {
|
|
1283
1174
|
readonly type: "seconds";
|
|
@@ -1305,7 +1196,9 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1305
1196
|
readonly [x: string]: unknown;
|
|
1306
1197
|
};
|
|
1307
1198
|
} | undefined;
|
|
1308
|
-
}, {
|
|
1199
|
+
}, {
|
|
1200
|
+
readonly type: keyof Handlers;
|
|
1201
|
+
}>) => any)): (value: {
|
|
1309
1202
|
readonly type: "image-partial";
|
|
1310
1203
|
readonly index: number;
|
|
1311
1204
|
readonly image: Media.Asset;
|
|
@@ -1349,7 +1242,7 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1349
1242
|
readonly [x: string]: unknown;
|
|
1350
1243
|
};
|
|
1351
1244
|
} | undefined;
|
|
1352
|
-
}) => import("effect/Unify").Unify<{ [K in keyof
|
|
1245
|
+
}) => import("effect/Unify").Unify<{ [K in keyof Handlers]-?: NonNullable<Handlers[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Handlers] | (OrElse extends (...args: Array<any>) => infer R ? R : never)>;
|
|
1353
1246
|
};
|
|
1354
1247
|
} & {
|
|
1355
1248
|
is: {
|
|
@@ -1405,12 +1298,12 @@ export declare const ImageEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1405
1298
|
};
|
|
1406
1299
|
};
|
|
1407
1300
|
export type ImageEvent = Schema.Schema.Type<typeof imageEventTagged>;
|
|
1408
|
-
|
|
1409
|
-
export declare
|
|
1410
|
-
export declare function generate<const Model extends ImageModel>(input:
|
|
1411
|
-
export declare function stream<const Model extends ImageModel>(input:
|
|
1301
|
+
/** Normalize image request input into a plain `ImageRequest`. */
|
|
1302
|
+
export declare const request: <const Model extends ImageModel>(input: ImageRequestInput<Model>) => ImageRequest<Model>;
|
|
1303
|
+
export declare function generate<const Model extends ImageModel>(input: ImageRequestInput<Model>, options?: AwaitOptions): Effect.Effect<ImageResponse, AIError, Service>;
|
|
1304
|
+
export declare function stream<const Model extends ImageModel>(input: ImageRequestInput<Model>, options?: AwaitOptions): Stream.Stream<ImageEvent, AIError, Service>;
|
|
1412
1305
|
/** Inline and streaming routes fail with `UnsupportedOperation`. */
|
|
1413
|
-
export declare function start<const Model extends ImageModel>(input:
|
|
1306
|
+
export declare function start<const Model extends ImageModel>(input: ImageRequestInput<Model>): Effect.Effect<Generation<ImageResponse>, AIError, Service>;
|
|
1414
1307
|
export declare const resume: (model: ImageModel, token: unknown) => Effect.Effect<Generation<ImageResponse>, AIError, Service>;
|
|
1415
1308
|
export declare const Image: {
|
|
1416
1309
|
readonly request: typeof request;
|