@opencode/ai 2.0.14 → 2.0.16
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 +399 -56
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation-client.js +39 -3
- package/dist/experimental/evaluation.d.ts +4 -4
- package/dist/experimental/evaluation.js +2 -2
- package/dist/experimental/system-one.d.ts +3 -3
- package/dist/experimental/system-one.js +40 -51
- package/dist/generation.d.ts +83 -0
- package/dist/generation.js +113 -0
- package/dist/image-client.d.ts +16 -7
- package/dist/image-client.js +29 -13
- package/dist/image.d.ts +1410 -81
- package/dist/image.js +97 -67
- package/dist/index.d.ts +17 -2
- package/dist/index.js +12 -1
- package/dist/llm.d.ts +9 -1
- package/dist/media-model.d.ts +44 -0
- package/dist/media-model.js +49 -0
- package/dist/media.d.ts +213 -0
- package/dist/media.js +227 -0
- package/dist/promise.d.ts +974 -0
- package/dist/promise.js +81 -0
- package/dist/protocols/alibaba-chat.d.ts +12 -0
- package/dist/protocols/alibaba-responses.d.ts +2 -2
- package/dist/protocols/anthropic-messages.js +8 -19
- package/dist/protocols/assemblyai-transcription.d.ts +40 -0
- package/dist/protocols/assemblyai-transcription.js +138 -0
- package/dist/protocols/bedrock-converse.d.ts +4 -4
- package/dist/protocols/bedrock-converse.js +6 -17
- package/dist/protocols/bfl-images.d.ts +32 -0
- package/dist/protocols/bfl-images.js +153 -0
- package/dist/protocols/cartesia-speech.d.ts +127 -0
- package/dist/protocols/cartesia-speech.js +126 -0
- package/dist/protocols/deepgram-speech.d.ts +119 -0
- package/dist/protocols/deepgram-speech.js +92 -0
- package/dist/protocols/deepgram-transcription.d.ts +25 -0
- package/dist/protocols/deepgram-transcription.js +129 -0
- package/dist/protocols/elevenlabs-speech.d.ts +122 -0
- package/dist/protocols/elevenlabs-speech.js +115 -0
- package/dist/protocols/fal-images.d.ts +24 -0
- package/dist/protocols/fal-images.js +114 -0
- package/dist/protocols/fal-video.d.ts +29 -0
- package/dist/protocols/fal-video.js +88 -0
- package/dist/protocols/gemini.d.ts +30 -9
- package/dist/protocols/gemini.js +45 -35
- package/dist/protocols/google-images.d.ts +9 -21
- package/dist/protocols/google-images.js +158 -133
- package/dist/protocols/google-speech.d.ts +130 -0
- package/dist/protocols/google-speech.js +84 -0
- package/dist/protocols/google-transcription.d.ts +173 -0
- package/dist/protocols/google-transcription.js +138 -0
- package/dist/protocols/google-video.d.ts +26 -0
- package/dist/protocols/google-video.js +158 -0
- package/dist/protocols/meta-images.d.ts +7 -12
- package/dist/protocols/meta-images.js +85 -66
- package/dist/protocols/meta-responses.d.ts +4 -4
- package/dist/protocols/meta-responses.js +1 -1
- package/dist/protocols/mistral-chat.js +7 -6
- package/dist/protocols/open-responses.d.ts +17 -9
- package/dist/protocols/open-responses.js +24 -14
- package/dist/protocols/openai-chat.d.ts +118 -1
- package/dist/protocols/openai-chat.js +125 -44
- package/dist/protocols/openai-compatible-chat.d.ts +12 -0
- package/dist/protocols/openai-compatible-responses.d.ts +2 -2
- package/dist/protocols/openai-images.d.ts +128 -18
- package/dist/protocols/openai-images.js +177 -154
- package/dist/protocols/openai-responses.d.ts +15 -15
- package/dist/protocols/openai-responses.js +5 -6
- package/dist/protocols/openai-speech.d.ts +116 -0
- package/dist/protocols/openai-speech.js +98 -0
- package/dist/protocols/openai-transcription.d.ts +207 -0
- package/dist/protocols/openai-transcription.js +190 -0
- package/dist/protocols/replicate-images.d.ts +28 -0
- package/dist/protocols/replicate-images.js +133 -0
- package/dist/protocols/runway-video.d.ts +38 -0
- package/dist/protocols/runway-video.js +146 -0
- package/dist/protocols/shared.d.ts +27 -17
- package/dist/protocols/shared.js +52 -35
- package/dist/protocols/stability-images.d.ts +38 -0
- package/dist/protocols/stability-images.js +148 -0
- package/dist/protocols/utils/bedrock-media.d.ts +2 -3
- package/dist/protocols/utils/bedrock-media.js +4 -4
- package/dist/protocols/utils/fal-queue.d.ts +28 -0
- package/dist/protocols/utils/fal-queue.js +69 -0
- package/dist/protocols/utils/gemini-generate-content.d.ts +65 -0
- package/dist/protocols/utils/gemini-generate-content.js +65 -0
- package/dist/protocols/utils/gemini-json-schema.d.ts +3 -0
- package/dist/protocols/utils/gemini-json-schema.js +76 -0
- package/dist/protocols/utils/media-input.d.ts +18 -0
- package/dist/protocols/utils/media-input.js +35 -0
- package/dist/protocols/utils/responses-compaction.js +6 -5
- package/dist/protocols/utils/speech-stream.d.ts +49 -0
- package/dist/protocols/utils/speech-stream.js +67 -0
- package/dist/protocols/utils/tool-schema.d.ts +2 -2
- package/dist/protocols/utils/tool-schema.js +40 -17
- package/dist/protocols/utils/tool-stream.d.ts +27 -3
- package/dist/protocols/xai-images.d.ts +9 -15
- package/dist/protocols/xai-images.js +75 -84
- package/dist/protocols/xai-responses.d.ts +2 -2
- package/dist/protocols/xai-video.d.ts +34 -0
- package/dist/protocols/xai-video.js +147 -0
- package/dist/protocols/zai-chat.d.ts +13 -1
- package/dist/protocols/zai-images.d.ts +9 -13
- package/dist/protocols/zai-images.js +59 -57
- package/dist/provider-error.js +3 -0
- package/dist/providers/alibaba.d.ts +14 -2
- package/dist/providers/amazon-bedrock-mantle.d.ts +14 -2
- package/dist/providers/amazon-bedrock.d.ts +2 -2
- package/dist/providers/assemblyai.d.ts +25 -0
- package/dist/providers/assemblyai.js +29 -0
- package/dist/providers/azure.d.ts +18 -6
- package/dist/providers/baseten.d.ts +24 -0
- package/dist/providers/black-forest-labs.d.ts +25 -0
- package/dist/providers/black-forest-labs.js +28 -0
- package/dist/providers/cartesia.d.ts +24 -0
- package/dist/providers/cartesia.js +22 -0
- package/dist/providers/cerebras.d.ts +24 -0
- package/dist/providers/cerebras.js +6 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +30 -6
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -0
- package/dist/providers/deepgram.d.ts +29 -0
- package/dist/providers/deepgram.js +31 -0
- package/dist/providers/deepinfra.d.ts +24 -0
- package/dist/providers/deepinfra.js +6 -1
- package/dist/providers/deepseek.d.ts +24 -0
- package/dist/providers/elevenlabs.d.ts +24 -0
- package/dist/providers/elevenlabs.js +28 -0
- package/dist/providers/fal.d.ts +29 -0
- package/dist/providers/fal.js +33 -0
- package/dist/providers/fireworks.d.ts +24 -0
- package/dist/providers/google-vertex-chat.d.ts +12 -0
- package/dist/providers/google-vertex-responses.d.ts +2 -2
- package/dist/providers/google-vertex.d.ts +10 -3
- package/dist/providers/google.d.ts +25 -3
- package/dist/providers/google.js +11 -2
- package/dist/providers/groq.d.ts +24 -0
- package/dist/providers/index.d.ts +10 -0
- package/dist/providers/index.js +10 -0
- package/dist/providers/meta.d.ts +14 -2
- package/dist/providers/minimax.d.ts +14 -2
- package/dist/providers/moonshot.d.ts +14 -2
- package/dist/providers/moonshot.js +3 -3
- package/dist/providers/openai-compatible-responses.d.ts +2 -2
- package/dist/providers/openai-compatible.d.ts +12 -0
- package/dist/providers/openai.d.ts +25 -3
- package/dist/providers/openai.js +10 -1
- package/dist/providers/openrouter.d.ts +67 -0
- package/dist/providers/openrouter.js +13 -1
- package/dist/providers/replicate.d.ts +25 -0
- package/dist/providers/replicate.js +22 -0
- package/dist/providers/runway.d.ts +24 -0
- package/dist/providers/runway.js +22 -0
- package/dist/providers/stability.d.ts +28 -0
- package/dist/providers/stability.js +23 -0
- package/dist/providers/togetherai.d.ts +24 -0
- package/dist/providers/vercel-ai-gateway.d.ts +41 -0
- package/dist/providers/vercel-ai-gateway.js +85 -0
- package/dist/providers/xai.d.ts +17 -0
- package/dist/providers/xai.js +5 -2
- package/dist/providers/zai-coding-plan.d.ts +15 -3
- package/dist/providers/zai.d.ts +13 -1
- package/dist/route/auth.d.ts +4 -1
- package/dist/route/auth.js +6 -0
- package/dist/route/client.d.ts +9 -1
- package/dist/route/endpoint.d.ts +10 -10
- package/dist/route/executor-service.d.ts +12 -0
- package/dist/route/executor-service.js +3 -0
- package/dist/route/executor.d.ts +4 -9
- package/dist/route/executor.js +3 -3
- package/dist/route/framing.d.ts +5 -1
- package/dist/route/framing.js +9 -0
- package/dist/route/index.d.ts +2 -0
- package/dist/route/index.js +2 -0
- package/dist/route/media-protocol.d.ts +158 -0
- package/dist/route/media-protocol.js +96 -0
- package/dist/route/media.d.ts +97 -0
- package/dist/route/media.js +236 -0
- package/dist/schema/errors.d.ts +13 -3
- package/dist/schema/errors.js +7 -0
- package/dist/schema/events.d.ts +557 -40
- package/dist/schema/events.js +35 -2
- package/dist/schema/messages.d.ts +95 -8
- package/dist/schema/messages.js +8 -6
- package/dist/schema/options.d.ts +6 -3
- package/dist/schema/options.js +6 -2
- package/dist/speech-client.d.ts +21 -0
- package/dist/speech-client.js +25 -0
- package/dist/speech.d.ts +1150 -0
- package/dist/speech.js +119 -0
- package/dist/testing.d.ts +72 -8
- package/dist/transcription-client.d.ts +28 -0
- package/dist/transcription-client.js +44 -0
- package/dist/transcription.d.ts +1504 -0
- package/dist/transcription.js +133 -0
- package/dist/utils/bytes.d.ts +1 -0
- package/dist/utils/bytes.js +10 -0
- package/dist/utils/media-type.d.ts +7 -0
- package/dist/utils/media-type.js +70 -0
- package/dist/utils/sanitize.js +3 -1
- package/dist/video-client.d.ts +28 -0
- package/dist/video-client.js +40 -0
- package/dist/video.d.ts +1359 -0
- package/dist/video.js +119 -0
- package/package.json +7 -3
- package/dist/protocols/utils/gemini-tool-schema.d.ts +0 -2
- package/dist/protocols/utils/gemini-tool-schema.js +0 -103
- package/dist/protocols/utils/image-input.d.ts +0 -21
- package/dist/protocols/utils/image-input.js +0 -20
|
@@ -28,6 +28,12 @@ export declare const route: Route<{
|
|
|
28
28
|
readonly image_url: {
|
|
29
29
|
readonly url: string;
|
|
30
30
|
};
|
|
31
|
+
} | {
|
|
32
|
+
readonly type: "file";
|
|
33
|
+
readonly file: {
|
|
34
|
+
readonly filename: string;
|
|
35
|
+
readonly file_data: string;
|
|
36
|
+
};
|
|
31
37
|
})[];
|
|
32
38
|
} | {
|
|
33
39
|
readonly role: "user";
|
|
@@ -43,6 +49,12 @@ export declare const route: Route<{
|
|
|
43
49
|
readonly image_url: {
|
|
44
50
|
readonly url: string;
|
|
45
51
|
};
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "file";
|
|
54
|
+
readonly file: {
|
|
55
|
+
readonly filename: string;
|
|
56
|
+
readonly file_data: string;
|
|
57
|
+
};
|
|
46
58
|
})[];
|
|
47
59
|
} | {
|
|
48
60
|
readonly [x: string]: unknown;
|
|
@@ -127,6 +139,12 @@ export declare const routes: Route<{
|
|
|
127
139
|
readonly image_url: {
|
|
128
140
|
readonly url: string;
|
|
129
141
|
};
|
|
142
|
+
} | {
|
|
143
|
+
readonly type: "file";
|
|
144
|
+
readonly file: {
|
|
145
|
+
readonly filename: string;
|
|
146
|
+
readonly file_data: string;
|
|
147
|
+
};
|
|
130
148
|
})[];
|
|
131
149
|
} | {
|
|
132
150
|
readonly role: "user";
|
|
@@ -142,6 +160,12 @@ export declare const routes: Route<{
|
|
|
142
160
|
readonly image_url: {
|
|
143
161
|
readonly url: string;
|
|
144
162
|
};
|
|
163
|
+
} | {
|
|
164
|
+
readonly type: "file";
|
|
165
|
+
readonly file: {
|
|
166
|
+
readonly filename: string;
|
|
167
|
+
readonly file_data: string;
|
|
168
|
+
};
|
|
145
169
|
})[];
|
|
146
170
|
} | {
|
|
147
171
|
readonly [x: string]: unknown;
|
|
@@ -28,7 +28,12 @@ export const configure = (input = {}) => {
|
|
|
28
28
|
id,
|
|
29
29
|
model: (modelID) => configured.model({
|
|
30
30
|
id: modelID,
|
|
31
|
-
compatibility: {
|
|
31
|
+
compatibility: {
|
|
32
|
+
maxTokensField: "max_tokens",
|
|
33
|
+
reasoningField: "reasoning_content",
|
|
34
|
+
supportsStore: false,
|
|
35
|
+
supportsPromptCacheKey: true,
|
|
36
|
+
},
|
|
32
37
|
}),
|
|
33
38
|
configure,
|
|
34
39
|
};
|
|
@@ -28,6 +28,12 @@ export declare const route: Route<{
|
|
|
28
28
|
readonly image_url: {
|
|
29
29
|
readonly url: string;
|
|
30
30
|
};
|
|
31
|
+
} | {
|
|
32
|
+
readonly type: "file";
|
|
33
|
+
readonly file: {
|
|
34
|
+
readonly filename: string;
|
|
35
|
+
readonly file_data: string;
|
|
36
|
+
};
|
|
31
37
|
})[];
|
|
32
38
|
} | {
|
|
33
39
|
readonly role: "user";
|
|
@@ -43,6 +49,12 @@ export declare const route: Route<{
|
|
|
43
49
|
readonly image_url: {
|
|
44
50
|
readonly url: string;
|
|
45
51
|
};
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "file";
|
|
54
|
+
readonly file: {
|
|
55
|
+
readonly filename: string;
|
|
56
|
+
readonly file_data: string;
|
|
57
|
+
};
|
|
46
58
|
})[];
|
|
47
59
|
} | {
|
|
48
60
|
readonly [x: string]: unknown;
|
|
@@ -127,6 +139,12 @@ export declare const routes: Route<{
|
|
|
127
139
|
readonly image_url: {
|
|
128
140
|
readonly url: string;
|
|
129
141
|
};
|
|
142
|
+
} | {
|
|
143
|
+
readonly type: "file";
|
|
144
|
+
readonly file: {
|
|
145
|
+
readonly filename: string;
|
|
146
|
+
readonly file_data: string;
|
|
147
|
+
};
|
|
130
148
|
})[];
|
|
131
149
|
} | {
|
|
132
150
|
readonly role: "user";
|
|
@@ -142,6 +160,12 @@ export declare const routes: Route<{
|
|
|
142
160
|
readonly image_url: {
|
|
143
161
|
readonly url: string;
|
|
144
162
|
};
|
|
163
|
+
} | {
|
|
164
|
+
readonly type: "file";
|
|
165
|
+
readonly file: {
|
|
166
|
+
readonly filename: string;
|
|
167
|
+
readonly file_data: string;
|
|
168
|
+
};
|
|
145
169
|
})[];
|
|
146
170
|
} | {
|
|
147
171
|
readonly [x: string]: unknown;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
2
|
+
import { HttpOptions, type ModelID } from "../schema/index.js";
|
|
3
|
+
export type { ElevenLabsOutputFormat, ElevenLabsSpeechOptions } from "../protocols/elevenlabs-speech.js";
|
|
4
|
+
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
5
|
+
export type Config = ProviderAuthOption<"optional"> & {
|
|
6
|
+
readonly baseURL?: string;
|
|
7
|
+
readonly headers?: Record<string, string>;
|
|
8
|
+
readonly http?: HttpOptions.Input;
|
|
9
|
+
};
|
|
10
|
+
export declare const configure: (input?: Config) => {
|
|
11
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
12
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
|
|
13
|
+
configure: (input?: Config) => /*elided*/ any;
|
|
14
|
+
};
|
|
15
|
+
export declare const provider: {
|
|
16
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
17
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
|
|
18
|
+
configure: (input?: Config) => {
|
|
19
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
20
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
|
|
21
|
+
configure: /*elided*/ any;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/elevenlabs-speech.js").ElevenLabsSpeechOptions>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Auth } from "../route/auth.js";
|
|
2
|
+
import { HttpOptions, ProviderID } from "../schema/index.js";
|
|
3
|
+
import { DEFAULT_BASE_URL, ElevenLabsSpeech } from "../protocols/elevenlabs-speech.js";
|
|
4
|
+
export const id = ProviderID.make("elevenlabs");
|
|
5
|
+
const baseURL = DEFAULT_BASE_URL;
|
|
6
|
+
const auth = (options) => {
|
|
7
|
+
if ("auth" in options && options.auth)
|
|
8
|
+
return options.auth;
|
|
9
|
+
return Auth.optional("apiKey" in options ? options.apiKey : undefined, "apiKey")
|
|
10
|
+
.orElse(Auth.config("ELEVENLABS_API_KEY"))
|
|
11
|
+
.pipe(Auth.header("xi-api-key"));
|
|
12
|
+
};
|
|
13
|
+
export const configure = (input = {}) => {
|
|
14
|
+
const speech = (modelID) => ElevenLabsSpeech.model({
|
|
15
|
+
id: modelID,
|
|
16
|
+
auth: auth(input),
|
|
17
|
+
baseURL: input.baseURL ?? baseURL,
|
|
18
|
+
headers: input.headers,
|
|
19
|
+
http: input.http === undefined ? undefined : HttpOptions.make(input.http),
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
id,
|
|
23
|
+
speech,
|
|
24
|
+
configure,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export const provider = configure();
|
|
28
|
+
export const speech = provider.speech;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
2
|
+
import { HttpOptions, type ModelID } from "../schema/index.js";
|
|
3
|
+
export type { FalImageOptions } from "../protocols/fal-images.js";
|
|
4
|
+
export type { FalVideoOptions } from "../protocols/fal-video.js";
|
|
5
|
+
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
6
|
+
export type Config = ProviderAuthOption<"optional"> & {
|
|
7
|
+
readonly baseURL?: string;
|
|
8
|
+
readonly headers?: Record<string, string>;
|
|
9
|
+
readonly http?: HttpOptions.Input;
|
|
10
|
+
};
|
|
11
|
+
export declare const configure: (input?: Config) => {
|
|
12
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
13
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/fal-images.js").FalImageOptions>;
|
|
14
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/fal-video.js").FalVideoOptions>;
|
|
15
|
+
configure: (input?: Config) => /*elided*/ any;
|
|
16
|
+
};
|
|
17
|
+
export declare const provider: {
|
|
18
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
19
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/fal-images.js").FalImageOptions>;
|
|
20
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/fal-video.js").FalVideoOptions>;
|
|
21
|
+
configure: (input?: Config) => {
|
|
22
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
23
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/fal-images.js").FalImageOptions>;
|
|
24
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/fal-video.js").FalVideoOptions>;
|
|
25
|
+
configure: /*elided*/ any;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/fal-images.js").FalImageOptions>;
|
|
29
|
+
export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/fal-video.js").FalVideoOptions>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Auth } from "../route/auth.js";
|
|
2
|
+
import { HttpOptions, ProviderID } from "../schema/index.js";
|
|
3
|
+
import { FalImages } from "../protocols/fal-images.js";
|
|
4
|
+
import { FalVideo } from "../protocols/fal-video.js";
|
|
5
|
+
import { FalQueue } from "../protocols/utils/fal-queue.js";
|
|
6
|
+
export const id = ProviderID.make("fal");
|
|
7
|
+
const baseURL = FalQueue.DEFAULT_BASE_URL;
|
|
8
|
+
// fal authenticates with `Authorization: Key <FAL_KEY>` rather than a bearer token.
|
|
9
|
+
const auth = (options) => {
|
|
10
|
+
if ("auth" in options && options.auth)
|
|
11
|
+
return options.auth;
|
|
12
|
+
return Auth.optional("apiKey" in options ? options.apiKey : undefined, "apiKey")
|
|
13
|
+
.orElse(Auth.config("FAL_KEY"))
|
|
14
|
+
.pipe(Auth.scheme("Key"));
|
|
15
|
+
};
|
|
16
|
+
export const configure = (input = {}) => {
|
|
17
|
+
const media = (modelID) => ({
|
|
18
|
+
id: modelID,
|
|
19
|
+
auth: auth(input),
|
|
20
|
+
baseURL: input.baseURL ?? baseURL,
|
|
21
|
+
headers: input.headers,
|
|
22
|
+
http: input.http === undefined ? undefined : HttpOptions.make(input.http),
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
id,
|
|
26
|
+
image: (modelID) => FalImages.model(media(modelID)),
|
|
27
|
+
video: (modelID) => FalVideo.model(media(modelID)),
|
|
28
|
+
configure,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export const provider = configure();
|
|
32
|
+
export const image = provider.image;
|
|
33
|
+
export const video = provider.video;
|
|
@@ -28,6 +28,12 @@ export declare const route: Route<{
|
|
|
28
28
|
readonly image_url: {
|
|
29
29
|
readonly url: string;
|
|
30
30
|
};
|
|
31
|
+
} | {
|
|
32
|
+
readonly type: "file";
|
|
33
|
+
readonly file: {
|
|
34
|
+
readonly filename: string;
|
|
35
|
+
readonly file_data: string;
|
|
36
|
+
};
|
|
31
37
|
})[];
|
|
32
38
|
} | {
|
|
33
39
|
readonly role: "user";
|
|
@@ -43,6 +49,12 @@ export declare const route: Route<{
|
|
|
43
49
|
readonly image_url: {
|
|
44
50
|
readonly url: string;
|
|
45
51
|
};
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: "file";
|
|
54
|
+
readonly file: {
|
|
55
|
+
readonly filename: string;
|
|
56
|
+
readonly file_data: string;
|
|
57
|
+
};
|
|
46
58
|
})[];
|
|
47
59
|
} | {
|
|
48
60
|
readonly [x: string]: unknown;
|
|
@@ -127,6 +139,12 @@ export declare const routes: Route<{
|
|
|
127
139
|
readonly image_url: {
|
|
128
140
|
readonly url: string;
|
|
129
141
|
};
|
|
142
|
+
} | {
|
|
143
|
+
readonly type: "file";
|
|
144
|
+
readonly file: {
|
|
145
|
+
readonly filename: string;
|
|
146
|
+
readonly file_data: string;
|
|
147
|
+
};
|
|
130
148
|
})[];
|
|
131
149
|
} | {
|
|
132
150
|
readonly role: "user";
|
|
@@ -142,6 +160,12 @@ export declare const routes: Route<{
|
|
|
142
160
|
readonly image_url: {
|
|
143
161
|
readonly url: string;
|
|
144
162
|
};
|
|
163
|
+
} | {
|
|
164
|
+
readonly type: "file";
|
|
165
|
+
readonly file: {
|
|
166
|
+
readonly filename: string;
|
|
167
|
+
readonly file_data: string;
|
|
168
|
+
};
|
|
145
169
|
})[];
|
|
146
170
|
} | {
|
|
147
171
|
readonly [x: string]: unknown;
|
|
@@ -33,6 +33,12 @@ export declare const routes: Route<{
|
|
|
33
33
|
readonly image_url: {
|
|
34
34
|
readonly url: string;
|
|
35
35
|
};
|
|
36
|
+
} | {
|
|
37
|
+
readonly type: "file";
|
|
38
|
+
readonly file: {
|
|
39
|
+
readonly filename: string;
|
|
40
|
+
readonly file_data: string;
|
|
41
|
+
};
|
|
36
42
|
})[];
|
|
37
43
|
} | {
|
|
38
44
|
readonly role: "user";
|
|
@@ -48,6 +54,12 @@ export declare const routes: Route<{
|
|
|
48
54
|
readonly image_url: {
|
|
49
55
|
readonly url: string;
|
|
50
56
|
};
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: "file";
|
|
59
|
+
readonly file: {
|
|
60
|
+
readonly filename: string;
|
|
61
|
+
readonly file_data: string;
|
|
62
|
+
};
|
|
51
63
|
})[];
|
|
52
64
|
} | {
|
|
53
65
|
readonly [x: string]: unknown;
|
|
@@ -84,8 +84,8 @@ export declare const routes: Route<{
|
|
|
84
84
|
} | {
|
|
85
85
|
readonly type: "input_file";
|
|
86
86
|
readonly filename: string;
|
|
87
|
-
readonly detail?: string | undefined;
|
|
88
87
|
readonly file_data?: string | undefined;
|
|
88
|
+
readonly detail?: string | undefined;
|
|
89
89
|
readonly file_url?: string | undefined;
|
|
90
90
|
} | {
|
|
91
91
|
readonly type: "input_text";
|
|
@@ -121,8 +121,8 @@ export declare const routes: Route<{
|
|
|
121
121
|
} | {
|
|
122
122
|
readonly type: "input_file";
|
|
123
123
|
readonly filename: string;
|
|
124
|
-
readonly detail?: string | undefined;
|
|
125
124
|
readonly file_data?: string | undefined;
|
|
125
|
+
readonly detail?: string | undefined;
|
|
126
126
|
readonly file_url?: string | undefined;
|
|
127
127
|
} | {
|
|
128
128
|
readonly type: "input_text";
|
|
@@ -32,10 +32,16 @@ export declare const routes: Route<{
|
|
|
32
32
|
readonly mimeType: string;
|
|
33
33
|
readonly data: string;
|
|
34
34
|
};
|
|
35
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
35
36
|
} | {
|
|
36
37
|
readonly text: string;
|
|
37
38
|
readonly thought?: boolean | null | undefined;
|
|
38
39
|
readonly thoughtSignature?: string | null | undefined;
|
|
40
|
+
} | {
|
|
41
|
+
readonly fileData: {
|
|
42
|
+
readonly mimeType: string;
|
|
43
|
+
readonly fileUri: string;
|
|
44
|
+
};
|
|
39
45
|
} | {
|
|
40
46
|
readonly functionCall: {
|
|
41
47
|
readonly name: string;
|
|
@@ -53,6 +59,7 @@ export declare const routes: Route<{
|
|
|
53
59
|
readonly mimeType: string;
|
|
54
60
|
readonly data: string;
|
|
55
61
|
};
|
|
62
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
56
63
|
}[] | undefined;
|
|
57
64
|
};
|
|
58
65
|
})[] | null | undefined;
|
|
@@ -60,11 +67,11 @@ export declare const routes: Route<{
|
|
|
60
67
|
}[];
|
|
61
68
|
readonly tools?: readonly {
|
|
62
69
|
readonly functionDeclarations: readonly {
|
|
63
|
-
readonly description: string;
|
|
64
70
|
readonly name: string;
|
|
65
|
-
readonly
|
|
71
|
+
readonly description: string;
|
|
72
|
+
readonly parametersJsonSchema: {
|
|
66
73
|
readonly [x: string]: unknown;
|
|
67
|
-
}
|
|
74
|
+
};
|
|
68
75
|
}[];
|
|
69
76
|
}[] | undefined;
|
|
70
77
|
readonly serviceTier?: string | undefined;
|
|
@@ -4,6 +4,9 @@ import type { ProviderPackage } from "../provider-package.js";
|
|
|
4
4
|
import { type ModelID } from "../schema/index.js";
|
|
5
5
|
import { Gemini } from "../protocols/gemini.js";
|
|
6
6
|
export type { GoogleImageOptions } from "../protocols/google-images.js";
|
|
7
|
+
export type { GoogleSpeechOptions } from "../protocols/google-speech.js";
|
|
8
|
+
export type { GoogleTranscriptionOptions } from "../protocols/google-transcription.js";
|
|
9
|
+
export type { GoogleVideoOptions } from "../protocols/google-video.js";
|
|
7
10
|
export type GeminiOptionsInput = Gemini.OptionsInput;
|
|
8
11
|
export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
|
|
9
12
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -14,10 +17,16 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
14
17
|
readonly mimeType: string;
|
|
15
18
|
readonly data: string;
|
|
16
19
|
};
|
|
20
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
17
21
|
} | {
|
|
18
22
|
readonly text: string;
|
|
19
23
|
readonly thought?: boolean | null | undefined;
|
|
20
24
|
readonly thoughtSignature?: string | null | undefined;
|
|
25
|
+
} | {
|
|
26
|
+
readonly fileData: {
|
|
27
|
+
readonly mimeType: string;
|
|
28
|
+
readonly fileUri: string;
|
|
29
|
+
};
|
|
21
30
|
} | {
|
|
22
31
|
readonly functionCall: {
|
|
23
32
|
readonly name: string;
|
|
@@ -35,6 +44,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
35
44
|
readonly mimeType: string;
|
|
36
45
|
readonly data: string;
|
|
37
46
|
};
|
|
47
|
+
readonly thoughtSignature?: string | null | undefined;
|
|
38
48
|
}[] | undefined;
|
|
39
49
|
};
|
|
40
50
|
})[] | null | undefined;
|
|
@@ -42,11 +52,11 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
42
52
|
}[];
|
|
43
53
|
readonly tools?: readonly {
|
|
44
54
|
readonly functionDeclarations: readonly {
|
|
45
|
-
readonly description: string;
|
|
46
55
|
readonly name: string;
|
|
47
|
-
readonly
|
|
56
|
+
readonly description: string;
|
|
57
|
+
readonly parametersJsonSchema: {
|
|
48
58
|
readonly [x: string]: unknown;
|
|
49
|
-
}
|
|
59
|
+
};
|
|
50
60
|
}[];
|
|
51
61
|
}[] | undefined;
|
|
52
62
|
readonly serviceTier?: string | undefined;
|
|
@@ -97,18 +107,30 @@ export declare const configure: (input?: Config) => {
|
|
|
97
107
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
98
108
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
99
109
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
110
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
|
|
111
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
112
|
+
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
|
100
113
|
configure: (input?: Config) => /*elided*/ any;
|
|
101
114
|
};
|
|
102
115
|
export declare const provider: {
|
|
103
116
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
104
117
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
105
118
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
119
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
|
|
120
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
121
|
+
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
|
106
122
|
configure: (input?: Config) => {
|
|
107
123
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
108
124
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
109
125
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
126
|
+
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
|
|
127
|
+
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
128
|
+
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
|
110
129
|
configure: /*elided*/ any;
|
|
111
130
|
};
|
|
112
131
|
};
|
|
113
132
|
export declare const model: ProviderPackage.Definition<Settings, Gemini.ProviderOptionsInput>["model"];
|
|
114
133
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
134
|
+
export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
|
|
135
|
+
export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
136
|
+
export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
package/dist/providers/google.js
CHANGED
|
@@ -2,6 +2,9 @@ import { Auth } from "../route/auth.js";
|
|
|
2
2
|
import { HttpOptions, ProviderID, mergeHttpOptions } from "../schema/index.js";
|
|
3
3
|
import { Gemini } from "../protocols/gemini.js";
|
|
4
4
|
import { GoogleImages } from "../protocols/google-images.js";
|
|
5
|
+
import { GoogleSpeech } from "../protocols/google-speech.js";
|
|
6
|
+
import { GoogleTranscription } from "../protocols/google-transcription.js";
|
|
7
|
+
import { GoogleVideo } from "../protocols/google-video.js";
|
|
5
8
|
export const id = ProviderID.make("google");
|
|
6
9
|
export const routes = [Gemini.route];
|
|
7
10
|
const auth = (options) => {
|
|
@@ -17,7 +20,7 @@ const configuredRoute = (input) => {
|
|
|
17
20
|
};
|
|
18
21
|
export const configure = (input = {}) => {
|
|
19
22
|
const route = configuredRoute(input);
|
|
20
|
-
const
|
|
23
|
+
const media = (modelID) => ({
|
|
21
24
|
id: modelID,
|
|
22
25
|
auth: auth(input),
|
|
23
26
|
baseURL: input.baseURL,
|
|
@@ -27,7 +30,10 @@ export const configure = (input = {}) => {
|
|
|
27
30
|
return {
|
|
28
31
|
id,
|
|
29
32
|
model: (modelID) => route.model({ id: modelID }),
|
|
30
|
-
image,
|
|
33
|
+
image: (modelID) => GoogleImages.model(media(modelID)),
|
|
34
|
+
video: (modelID) => GoogleVideo.model(media(modelID)),
|
|
35
|
+
speech: (modelID) => GoogleSpeech.model(media(modelID)),
|
|
36
|
+
transcription: (modelID) => GoogleTranscription.model(media(modelID)),
|
|
31
37
|
configure,
|
|
32
38
|
};
|
|
33
39
|
};
|
|
@@ -40,3 +46,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
40
46
|
providerOptions,
|
|
41
47
|
}).model(modelID);
|
|
42
48
|
export const image = provider.image;
|
|
49
|
+
export const video = provider.video;
|
|
50
|
+
export const speech = provider.speech;
|
|
51
|
+
export const transcription = provider.transcription;
|
package/dist/providers/groq.d.ts
CHANGED
|
@@ -37,6 +37,12 @@ export declare const protocol: Protocol<{
|
|
|
37
37
|
readonly image_url: {
|
|
38
38
|
readonly url: string;
|
|
39
39
|
};
|
|
40
|
+
} | {
|
|
41
|
+
readonly type: "file";
|
|
42
|
+
readonly file: {
|
|
43
|
+
readonly filename: string;
|
|
44
|
+
readonly file_data: string;
|
|
45
|
+
};
|
|
40
46
|
})[];
|
|
41
47
|
} | {
|
|
42
48
|
readonly role: "user";
|
|
@@ -52,6 +58,12 @@ export declare const protocol: Protocol<{
|
|
|
52
58
|
readonly image_url: {
|
|
53
59
|
readonly url: string;
|
|
54
60
|
};
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: "file";
|
|
63
|
+
readonly file: {
|
|
64
|
+
readonly filename: string;
|
|
65
|
+
readonly file_data: string;
|
|
66
|
+
};
|
|
55
67
|
})[];
|
|
56
68
|
} | {
|
|
57
69
|
readonly [x: string]: unknown;
|
|
@@ -208,6 +220,12 @@ export declare const route: Route<{
|
|
|
208
220
|
readonly image_url: {
|
|
209
221
|
readonly url: string;
|
|
210
222
|
};
|
|
223
|
+
} | {
|
|
224
|
+
readonly type: "file";
|
|
225
|
+
readonly file: {
|
|
226
|
+
readonly filename: string;
|
|
227
|
+
readonly file_data: string;
|
|
228
|
+
};
|
|
211
229
|
})[];
|
|
212
230
|
} | {
|
|
213
231
|
readonly role: "user";
|
|
@@ -223,6 +241,12 @@ export declare const route: Route<{
|
|
|
223
241
|
readonly image_url: {
|
|
224
242
|
readonly url: string;
|
|
225
243
|
};
|
|
244
|
+
} | {
|
|
245
|
+
readonly type: "file";
|
|
246
|
+
readonly file: {
|
|
247
|
+
readonly filename: string;
|
|
248
|
+
readonly file_data: string;
|
|
249
|
+
};
|
|
226
250
|
})[];
|
|
227
251
|
} | {
|
|
228
252
|
readonly [x: string]: unknown;
|
|
@@ -3,13 +3,19 @@ export * as Anthropic from "./anthropic.js";
|
|
|
3
3
|
export * as AnthropicCompatible from "./anthropic-compatible.js";
|
|
4
4
|
export * as AmazonBedrock from "./amazon-bedrock.js";
|
|
5
5
|
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
6
|
+
export * as AssemblyAI from "./assemblyai.js";
|
|
6
7
|
export * as Azure from "./azure.js";
|
|
7
8
|
export * as Baseten from "./baseten.js";
|
|
9
|
+
export * as BlackForestLabs from "./black-forest-labs.js";
|
|
10
|
+
export * as Cartesia from "./cartesia.js";
|
|
8
11
|
export * as Cerebras from "./cerebras.js";
|
|
9
12
|
export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
|
|
10
13
|
export * as CloudflareWorkersAI from "./cloudflare-workers-ai.js";
|
|
11
14
|
export * as DeepInfra from "./deepinfra.js";
|
|
15
|
+
export * as Deepgram from "./deepgram.js";
|
|
12
16
|
export * as DeepSeek from "./deepseek.js";
|
|
17
|
+
export * as ElevenLabs from "./elevenlabs.js";
|
|
18
|
+
export * as Fal from "./fal.js";
|
|
13
19
|
export * as Fireworks from "./fireworks.js";
|
|
14
20
|
export * as Google from "./google.js";
|
|
15
21
|
export * as GoogleVertex from "./google-vertex.js";
|
|
@@ -26,8 +32,12 @@ export * as OpenAICompatible from "./openai-compatible.js";
|
|
|
26
32
|
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
27
33
|
export * as OpenCodeZen from "./opencode-zen.js";
|
|
28
34
|
export * as OpenRouter from "./openrouter.js";
|
|
35
|
+
export * as Replicate from "./replicate.js";
|
|
36
|
+
export * as Runway from "./runway.js";
|
|
37
|
+
export * as Stability from "./stability.js";
|
|
29
38
|
export * as TogetherAI from "./togetherai.js";
|
|
30
39
|
export * as TypeSafeAI from "./typesafe-ai.js";
|
|
40
|
+
export * as VercelAIGateway from "./vercel-ai-gateway.js";
|
|
31
41
|
export * as XAI from "./xai.js";
|
|
32
42
|
export * as ZAI from "./zai.js";
|
|
33
43
|
export * as ZAICodingPlan from "./zai-coding-plan.js";
|
package/dist/providers/index.js
CHANGED
|
@@ -3,13 +3,19 @@ export * as Anthropic from "./anthropic.js";
|
|
|
3
3
|
export * as AnthropicCompatible from "./anthropic-compatible.js";
|
|
4
4
|
export * as AmazonBedrock from "./amazon-bedrock.js";
|
|
5
5
|
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
6
|
+
export * as AssemblyAI from "./assemblyai.js";
|
|
6
7
|
export * as Azure from "./azure.js";
|
|
7
8
|
export * as Baseten from "./baseten.js";
|
|
9
|
+
export * as BlackForestLabs from "./black-forest-labs.js";
|
|
10
|
+
export * as Cartesia from "./cartesia.js";
|
|
8
11
|
export * as Cerebras from "./cerebras.js";
|
|
9
12
|
export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
|
|
10
13
|
export * as CloudflareWorkersAI from "./cloudflare-workers-ai.js";
|
|
11
14
|
export * as DeepInfra from "./deepinfra.js";
|
|
15
|
+
export * as Deepgram from "./deepgram.js";
|
|
12
16
|
export * as DeepSeek from "./deepseek.js";
|
|
17
|
+
export * as ElevenLabs from "./elevenlabs.js";
|
|
18
|
+
export * as Fal from "./fal.js";
|
|
13
19
|
export * as Fireworks from "./fireworks.js";
|
|
14
20
|
export * as Google from "./google.js";
|
|
15
21
|
export * as GoogleVertex from "./google-vertex.js";
|
|
@@ -26,8 +32,12 @@ export * as OpenAICompatible from "./openai-compatible.js";
|
|
|
26
32
|
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
27
33
|
export * as OpenCodeZen from "./opencode-zen.js";
|
|
28
34
|
export * as OpenRouter from "./openrouter.js";
|
|
35
|
+
export * as Replicate from "./replicate.js";
|
|
36
|
+
export * as Runway from "./runway.js";
|
|
37
|
+
export * as Stability from "./stability.js";
|
|
29
38
|
export * as TogetherAI from "./togetherai.js";
|
|
30
39
|
export * as TypeSafeAI from "./typesafe-ai.js";
|
|
40
|
+
export * as VercelAIGateway from "./vercel-ai-gateway.js";
|
|
31
41
|
export * as XAI from "./xai.js";
|
|
32
42
|
export * as ZAI from "./zai.js";
|
|
33
43
|
export * as ZAICodingPlan from "./zai-coding-plan.js";
|
package/dist/providers/meta.d.ts
CHANGED
|
@@ -54,6 +54,12 @@ export declare const routes: (Route<{
|
|
|
54
54
|
readonly image_url: {
|
|
55
55
|
readonly url: string;
|
|
56
56
|
};
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: "file";
|
|
59
|
+
readonly file: {
|
|
60
|
+
readonly filename: string;
|
|
61
|
+
readonly file_data: string;
|
|
62
|
+
};
|
|
57
63
|
})[];
|
|
58
64
|
} | {
|
|
59
65
|
readonly role: "user";
|
|
@@ -69,6 +75,12 @@ export declare const routes: (Route<{
|
|
|
69
75
|
readonly image_url: {
|
|
70
76
|
readonly url: string;
|
|
71
77
|
};
|
|
78
|
+
} | {
|
|
79
|
+
readonly type: "file";
|
|
80
|
+
readonly file: {
|
|
81
|
+
readonly filename: string;
|
|
82
|
+
readonly file_data: string;
|
|
83
|
+
};
|
|
72
84
|
})[];
|
|
73
85
|
} | {
|
|
74
86
|
readonly [x: string]: unknown;
|
|
@@ -203,8 +215,8 @@ export declare const routes: (Route<{
|
|
|
203
215
|
} | {
|
|
204
216
|
readonly type: "input_file";
|
|
205
217
|
readonly filename: string;
|
|
206
|
-
readonly detail?: string | undefined;
|
|
207
218
|
readonly file_data?: string | undefined;
|
|
219
|
+
readonly detail?: string | undefined;
|
|
208
220
|
readonly file_url?: string | undefined;
|
|
209
221
|
} | {
|
|
210
222
|
readonly type: "input_text";
|
|
@@ -240,8 +252,8 @@ export declare const routes: (Route<{
|
|
|
240
252
|
} | {
|
|
241
253
|
readonly type: "input_file";
|
|
242
254
|
readonly filename: string;
|
|
243
|
-
readonly detail?: string | undefined;
|
|
244
255
|
readonly file_data?: string | undefined;
|
|
256
|
+
readonly detail?: string | undefined;
|
|
245
257
|
readonly file_url?: string | undefined;
|
|
246
258
|
} | {
|
|
247
259
|
readonly type: "input_text";
|