@arcships/aimux 0.1.0 → 0.1.2
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/aimux.darwin-arm64.node +0 -0
- package/aimux.linux-x64-gnu.node +0 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +78 -0
- package/dist/types/AiMuxError.d.ts +34 -0
- package/dist/types/AiMuxError.js +3 -0
- package/dist/types/AspectRatio.d.ts +11 -0
- package/dist/types/AspectRatio.js +3 -0
- package/dist/types/AudioChunk.d.ts +8 -0
- package/dist/types/AudioChunk.js +3 -0
- package/dist/types/AudioData.d.ts +11 -0
- package/dist/types/AudioData.js +3 -0
- package/dist/types/AudioInput.d.ts +8 -0
- package/dist/types/AudioInput.js +3 -0
- package/dist/types/CallOptions.d.ts +80 -0
- package/dist/types/CallOptions.js +2 -0
- package/dist/types/ContentPart.d.ts +100 -0
- package/dist/types/ContentPart.js +2 -0
- package/dist/types/EmbeddingCallOptions.d.ts +24 -0
- package/dist/types/EmbeddingCallOptions.js +2 -0
- package/dist/types/EmbeddingResponse.d.ts +16 -0
- package/dist/types/EmbeddingResponse.js +2 -0
- package/dist/types/EmbeddingResult.d.ts +33 -0
- package/dist/types/EmbeddingResult.js +2 -0
- package/dist/types/EmbeddingUsage.d.ts +9 -0
- package/dist/types/EmbeddingUsage.js +3 -0
- package/dist/types/FileBytes.d.ts +12 -0
- package/dist/types/FileBytes.js +3 -0
- package/dist/types/FileData.d.ts +25 -0
- package/dist/types/FileData.js +2 -0
- package/dist/types/FinishReason.d.ts +14 -0
- package/dist/types/FinishReason.js +2 -0
- package/dist/types/FinishReasonUnified.d.ts +4 -0
- package/dist/types/FinishReasonUnified.js +3 -0
- package/dist/types/FunctionTool.d.ts +35 -0
- package/dist/types/FunctionTool.js +2 -0
- package/dist/types/GenerateContent.d.ts +71 -0
- package/dist/types/GenerateContent.js +2 -0
- package/dist/types/GenerateResult.d.ts +45 -0
- package/dist/types/GenerateResult.js +2 -0
- package/dist/types/GenerateTextOptions.d.ts +38 -0
- package/dist/types/GenerateTextOptions.js +2 -0
- package/dist/types/GenerateTextResult.d.ts +34 -0
- package/dist/types/GenerateTextResult.js +2 -0
- package/dist/types/ImageCallOptions.d.ts +54 -0
- package/dist/types/ImageCallOptions.js +2 -0
- package/dist/types/ImageFile.d.ts +25 -0
- package/dist/types/ImageFile.js +2 -0
- package/dist/types/ImageFileData.d.ts +8 -0
- package/dist/types/ImageFileData.js +3 -0
- package/dist/types/ImageOutputs.d.ts +14 -0
- package/dist/types/ImageOutputs.js +3 -0
- package/dist/types/ImageResponse.d.ts +19 -0
- package/dist/types/ImageResponse.js +3 -0
- package/dist/types/ImageResult.d.ts +34 -0
- package/dist/types/ImageResult.js +2 -0
- package/dist/types/ImageUsage.d.ts +19 -0
- package/dist/types/ImageUsage.js +3 -0
- package/dist/types/InputAudioFormat.d.ts +13 -0
- package/dist/types/InputAudioFormat.js +3 -0
- package/dist/types/LanguageModelPromptMessage.d.ts +20 -0
- package/dist/types/LanguageModelPromptMessage.js +2 -0
- package/dist/types/MessageContent.d.ts +5 -0
- package/dist/types/MessageContent.js +2 -0
- package/dist/types/ModelId.d.ts +7 -0
- package/dist/types/ModelId.js +3 -0
- package/dist/types/ModelMessage.d.ts +9 -0
- package/dist/types/ModelMessage.js +2 -0
- package/dist/types/ModelPrompt.d.ts +7 -0
- package/dist/types/ModelPrompt.js +2 -0
- package/dist/types/ProviderTool.d.ts +24 -0
- package/dist/types/ProviderTool.js +2 -0
- package/dist/types/ReasoningEffort.d.ts +7 -0
- package/dist/types/ReasoningEffort.js +3 -0
- package/dist/types/RequestInfo.d.ts +12 -0
- package/dist/types/RequestInfo.js +2 -0
- package/dist/types/RerankingCallOptions.d.ts +33 -0
- package/dist/types/RerankingCallOptions.js +2 -0
- package/dist/types/RerankingDocuments.d.ts +15 -0
- package/dist/types/RerankingDocuments.js +2 -0
- package/dist/types/RerankingRank.d.ts +13 -0
- package/dist/types/RerankingRank.js +3 -0
- package/dist/types/RerankingResponse.d.ts +28 -0
- package/dist/types/RerankingResponse.js +2 -0
- package/dist/types/RerankingResult.d.ts +31 -0
- package/dist/types/RerankingResult.js +2 -0
- package/dist/types/ResponseFormat.d.ts +11 -0
- package/dist/types/ResponseFormat.js +2 -0
- package/dist/types/ResponseInfo.d.ts +30 -0
- package/dist/types/ResponseInfo.js +2 -0
- package/dist/types/ResponseMetadata.d.ts +8 -0
- package/dist/types/ResponseMetadata.js +3 -0
- package/dist/types/Role.d.ts +4 -0
- package/dist/types/Role.js +3 -0
- package/dist/types/SearchCallOptions.d.ts +46 -0
- package/dist/types/SearchCallOptions.js +2 -0
- package/dist/types/SearchResponse.d.ts +16 -0
- package/dist/types/SearchResponse.js +2 -0
- package/dist/types/SearchResult.d.ts +32 -0
- package/dist/types/SearchResult.js +2 -0
- package/dist/types/SearchResultItem.d.ts +33 -0
- package/dist/types/SearchResultItem.js +2 -0
- package/dist/types/Size.d.ts +11 -0
- package/dist/types/Size.js +3 -0
- package/dist/types/SpeechCallOptions.d.ts +47 -0
- package/dist/types/SpeechCallOptions.js +2 -0
- package/dist/types/SpeechRequest.d.ts +10 -0
- package/dist/types/SpeechRequest.js +2 -0
- package/dist/types/SpeechResponse.d.ts +24 -0
- package/dist/types/SpeechResponse.js +2 -0
- package/dist/types/SpeechResult.d.ts +34 -0
- package/dist/types/SpeechResult.js +2 -0
- package/dist/types/StreamPart.d.ts +155 -0
- package/dist/types/StreamPart.js +2 -0
- package/dist/types/TokenUsage.d.ts +29 -0
- package/dist/types/TokenUsage.js +3 -0
- package/dist/types/Tool.d.ts +12 -0
- package/dist/types/Tool.js +2 -0
- package/dist/types/ToolCall.d.ts +26 -0
- package/dist/types/ToolCall.js +2 -0
- package/dist/types/ToolChoice.d.ts +12 -0
- package/dist/types/ToolChoice.js +3 -0
- package/dist/types/ToolResult.d.ts +22 -0
- package/dist/types/ToolResult.js +2 -0
- package/dist/types/UploadFileCallOptions.d.ts +27 -0
- package/dist/types/UploadFileCallOptions.js +2 -0
- package/dist/types/UploadFileData.d.ts +17 -0
- package/dist/types/UploadFileData.js +2 -0
- package/dist/types/UploadFileResult.d.ts +35 -0
- package/dist/types/UploadFileResult.js +2 -0
- package/dist/types/Usage.d.ts +13 -0
- package/dist/types/Usage.js +2 -0
- package/dist/types/VideoCallOptions.d.ts +69 -0
- package/dist/types/VideoCallOptions.js +2 -0
- package/dist/types/VideoData.d.ts +22 -0
- package/dist/types/VideoData.js +3 -0
- package/dist/types/VideoFile.d.ts +29 -0
- package/dist/types/VideoFile.js +2 -0
- package/dist/types/VideoFileData.d.ts +8 -0
- package/dist/types/VideoFileData.js +3 -0
- package/dist/types/VideoFrameImage.d.ts +17 -0
- package/dist/types/VideoFrameImage.js +2 -0
- package/dist/types/VideoFrameType.d.ts +6 -0
- package/dist/types/VideoFrameType.js +3 -0
- package/dist/types/VideoResponse.d.ts +19 -0
- package/dist/types/VideoResponse.js +3 -0
- package/dist/types/VideoResult.d.ts +29 -0
- package/dist/types/VideoResult.js +2 -0
- package/dist/types/Warning.d.ts +23 -0
- package/dist/types/Warning.js +3 -0
- package/dist/types/serde_json/JsonValue.d.ts +3 -0
- package/dist/types/serde_json/JsonValue.js +3 -0
- package/dist/types.d.ts +73 -0
- package/dist/types.js +5 -0
- package/index.js +109 -109
- package/package.json +8 -6
- package/src/index.ts +0 -134
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
+
/**
|
|
3
|
+
* A tool call requested by the model.
|
|
4
|
+
*/
|
|
5
|
+
export type ToolCall = {
|
|
6
|
+
/**
|
|
7
|
+
* Provider-assigned call id.
|
|
8
|
+
*/
|
|
9
|
+
tool_call_id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Tool name.
|
|
12
|
+
*/
|
|
13
|
+
tool_name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Arguments as a JSON value (usually an object).
|
|
16
|
+
*/
|
|
17
|
+
input: JsonValue;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the tool call will be executed by the provider.
|
|
20
|
+
*/
|
|
21
|
+
provider_executed?: boolean | null;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
|
|
24
|
+
*/
|
|
25
|
+
dynamic?: boolean | null;
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the model should choose tools.
|
|
3
|
+
*
|
|
4
|
+
* Wire format aligns with Vercel AI SDK `toolChoice`:
|
|
5
|
+
* `"auto" | "none" | "required" | { "type": "tool", "toolName": "..." }`.
|
|
6
|
+
* This is a mixed tagged/untagged shape (unit variants as bare strings,
|
|
7
|
+
* `Tool` variant as a tagged object), so serde is implemented by hand.
|
|
8
|
+
*/
|
|
9
|
+
export type ToolChoice = "auto" | "none" | "required" | {
|
|
10
|
+
type: "tool";
|
|
11
|
+
toolName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
+
/**
|
|
3
|
+
* The result of executing a tool call, to be sent back to the model.
|
|
4
|
+
*/
|
|
5
|
+
export type ToolResult = {
|
|
6
|
+
/**
|
|
7
|
+
* Must match the corresponding `ToolCall::tool_call_id`.
|
|
8
|
+
*/
|
|
9
|
+
tool_call_id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The tool's output (usually a JSON-serializable value or plain text).
|
|
12
|
+
*/
|
|
13
|
+
result: JsonValue;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the result is an error or error message.
|
|
16
|
+
*/
|
|
17
|
+
is_error?: boolean | null;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the result is preliminary (replaces prior, e.g. image previews).
|
|
20
|
+
*/
|
|
21
|
+
preliminary?: boolean | null;
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UploadFileData } from "./UploadFileData";
|
|
2
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
+
/**
|
|
4
|
+
* Options passed to [`Files::upload_file`].
|
|
5
|
+
*
|
|
6
|
+
* Aligned with V4 `FilesV4UploadFileCallOptions`.
|
|
7
|
+
*/
|
|
8
|
+
export type UploadFileCallOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* The file data (raw bytes/base64 or inline text).
|
|
11
|
+
*/
|
|
12
|
+
data: UploadFileData;
|
|
13
|
+
/**
|
|
14
|
+
* The IANA media type of the file, e.g. `"application/pdf"`.
|
|
15
|
+
*/
|
|
16
|
+
media_type: string;
|
|
17
|
+
/**
|
|
18
|
+
* The filename of the file.
|
|
19
|
+
*/
|
|
20
|
+
filename: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Additional provider-specific options, keyed by provider name.
|
|
23
|
+
*/
|
|
24
|
+
provider_options: {
|
|
25
|
+
[key in string]: JsonValue;
|
|
26
|
+
} | null;
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileBytes } from "./FileBytes";
|
|
2
|
+
/**
|
|
3
|
+
* File data accepted by [`Files::upload_file`].
|
|
4
|
+
*
|
|
5
|
+
* The V4 spec restricts upload input to the `data` and `text` variants of
|
|
6
|
+
* `SharedV4FileData` (URLs and provider references are not valid uploads), so
|
|
7
|
+
* this is a dedicated two-variant enum rather than the full [`crate::shared::FileData`].
|
|
8
|
+
*/
|
|
9
|
+
export type UploadFileData = {
|
|
10
|
+
"Data": {
|
|
11
|
+
data: FileBytes;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
"Text": {
|
|
15
|
+
text: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Warning } from "./Warning";
|
|
2
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
+
/**
|
|
4
|
+
* Result of [`Files::upload_file`].
|
|
5
|
+
*
|
|
6
|
+
* Aligned with V4 `FilesV4UploadFileResult`.
|
|
7
|
+
*/
|
|
8
|
+
export type UploadFileResult = {
|
|
9
|
+
/**
|
|
10
|
+
* A provider reference mapping provider names to provider-specific file
|
|
11
|
+
* identifiers.
|
|
12
|
+
*/
|
|
13
|
+
provider_reference: {
|
|
14
|
+
[key in string]: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The IANA media type of the uploaded file, if available from the
|
|
18
|
+
* provider.
|
|
19
|
+
*/
|
|
20
|
+
media_type: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* The filename of the uploaded file, if available from the provider.
|
|
23
|
+
*/
|
|
24
|
+
filename: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Additional provider-specific metadata, keyed by provider name.
|
|
27
|
+
*/
|
|
28
|
+
provider_metadata: {
|
|
29
|
+
[key in string]: JsonValue;
|
|
30
|
+
} | null;
|
|
31
|
+
/**
|
|
32
|
+
* Warnings from the provider.
|
|
33
|
+
*/
|
|
34
|
+
warnings: Array<Warning>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TokenUsage } from "./TokenUsage";
|
|
2
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
+
/**
|
|
4
|
+
* Token usage statistics.
|
|
5
|
+
*/
|
|
6
|
+
export type Usage = {
|
|
7
|
+
input_tokens: TokenUsage;
|
|
8
|
+
output_tokens: TokenUsage;
|
|
9
|
+
/**
|
|
10
|
+
* Raw usage information from the provider (opaque, provider-specific).
|
|
11
|
+
*/
|
|
12
|
+
raw?: JsonValue | null;
|
|
13
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { AspectRatio } from "./AspectRatio";
|
|
2
|
+
import type { Size } from "./Size";
|
|
3
|
+
import type { VideoFile } from "./VideoFile";
|
|
4
|
+
import type { VideoFrameImage } from "./VideoFrameImage";
|
|
5
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
6
|
+
/**
|
|
7
|
+
* Options passed to [`VideoModel::do_generate`].
|
|
8
|
+
*
|
|
9
|
+
* Aligned with V4 `VideoModelV4CallOptions`.
|
|
10
|
+
*/
|
|
11
|
+
export type VideoCallOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* Text prompt for the video generation. `None` when not required.
|
|
14
|
+
*/
|
|
15
|
+
prompt: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Number of videos to generate. Default `1`; most models only support
|
|
18
|
+
* `n = 1` due to computational cost.
|
|
19
|
+
*/
|
|
20
|
+
n: number;
|
|
21
|
+
/**
|
|
22
|
+
* Aspect ratio, in `{width}:{height}` format (e.g. `"16:9"`).
|
|
23
|
+
*/
|
|
24
|
+
aspect_ratio: AspectRatio | null;
|
|
25
|
+
/**
|
|
26
|
+
* Resolution, in `{width}x{height}` format (e.g. `"1280x720"`).
|
|
27
|
+
*/
|
|
28
|
+
resolution: Size | null;
|
|
29
|
+
/**
|
|
30
|
+
* Duration of the video in seconds. Typically 3–10 seconds.
|
|
31
|
+
*/
|
|
32
|
+
duration: number | null;
|
|
33
|
+
/**
|
|
34
|
+
* Frames per second. Common values: 24, 30, 60.
|
|
35
|
+
*/
|
|
36
|
+
fps: number | null;
|
|
37
|
+
/**
|
|
38
|
+
* Seed for deterministic generation. `None` uses a random seed.
|
|
39
|
+
*/
|
|
40
|
+
seed: bigint | null;
|
|
41
|
+
/**
|
|
42
|
+
* Input image for image-to-video generation (the starting frame).
|
|
43
|
+
*/
|
|
44
|
+
image: VideoFile | null;
|
|
45
|
+
/**
|
|
46
|
+
* Role-tagged image inputs for first-last-frame generation.
|
|
47
|
+
*/
|
|
48
|
+
frame_images: Array<VideoFrameImage> | null;
|
|
49
|
+
/**
|
|
50
|
+
* Reference inputs for reference-to-video generation (images or videos).
|
|
51
|
+
*/
|
|
52
|
+
input_references: Array<VideoFile> | null;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the model should generate audio alongside the video.
|
|
55
|
+
*/
|
|
56
|
+
generate_audio: boolean | null;
|
|
57
|
+
/**
|
|
58
|
+
* Additional provider-specific options, keyed by provider name.
|
|
59
|
+
*/
|
|
60
|
+
provider_options: {
|
|
61
|
+
[key in string]: JsonValue;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Additional HTTP headers to send with the request.
|
|
65
|
+
*/
|
|
66
|
+
headers: {
|
|
67
|
+
[key in string]: string;
|
|
68
|
+
} | null;
|
|
69
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated video data: a URL, base64-encoded string, or binary data.
|
|
3
|
+
*
|
|
4
|
+
* Aligned with V4 `VideoModelV4VideoData`. Most providers return URLs due to
|
|
5
|
+
* large file sizes.
|
|
6
|
+
*/
|
|
7
|
+
export type VideoData = {
|
|
8
|
+
"Url": {
|
|
9
|
+
url: string;
|
|
10
|
+
media_type: string;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
"Base64": {
|
|
14
|
+
data: string;
|
|
15
|
+
media_type: string;
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
"Binary": {
|
|
19
|
+
data: Array<number>;
|
|
20
|
+
media_type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { VideoFileData } from "./VideoFileData";
|
|
2
|
+
/**
|
|
3
|
+
* A video or image file used for video editing or image-to-video generation.
|
|
4
|
+
*
|
|
5
|
+
* Aligned with V4 `VideoModelV4File`.
|
|
6
|
+
*/
|
|
7
|
+
export type VideoFile = {
|
|
8
|
+
"File": {
|
|
9
|
+
/**
|
|
10
|
+
* IANA media type, e.g. `"video/mp4"` or `"image/png"`.
|
|
11
|
+
*/
|
|
12
|
+
media_type: string;
|
|
13
|
+
/**
|
|
14
|
+
* File data as a base64 string or binary bytes.
|
|
15
|
+
*/
|
|
16
|
+
data: VideoFileData;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
"Url": {
|
|
20
|
+
/**
|
|
21
|
+
* The URL of the video or image file.
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
/**
|
|
25
|
+
* The media type of the referenced file, when known.
|
|
26
|
+
*/
|
|
27
|
+
media_type: string | null;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VideoFile } from "./VideoFile";
|
|
2
|
+
import type { VideoFrameType } from "./VideoFrameType";
|
|
3
|
+
/**
|
|
4
|
+
* A role-tagged image input for image-to-video and first-last-frame generation.
|
|
5
|
+
*
|
|
6
|
+
* Aligned with V4 `VideoModelV4FrameImage`.
|
|
7
|
+
*/
|
|
8
|
+
export type VideoFrameImage = {
|
|
9
|
+
/**
|
|
10
|
+
* The image file used for this frame.
|
|
11
|
+
*/
|
|
12
|
+
image: VideoFile;
|
|
13
|
+
/**
|
|
14
|
+
* Which frame this image represents.
|
|
15
|
+
*/
|
|
16
|
+
frame_type: VideoFrameType;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response information for a video generation call.
|
|
3
|
+
*/
|
|
4
|
+
export type VideoResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Timestamp for the start of the generated response (ISO 8601 string).
|
|
7
|
+
*/
|
|
8
|
+
timestamp: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the model that was used to generate the response.
|
|
11
|
+
*/
|
|
12
|
+
model_id: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Response headers.
|
|
15
|
+
*/
|
|
16
|
+
headers: {
|
|
17
|
+
[key in string]: string;
|
|
18
|
+
} | null;
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { VideoData } from "./VideoData";
|
|
2
|
+
import type { VideoResponse } from "./VideoResponse";
|
|
3
|
+
import type { Warning } from "./Warning";
|
|
4
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
5
|
+
/**
|
|
6
|
+
* The result of [`VideoModel::do_generate`].
|
|
7
|
+
*
|
|
8
|
+
* Aligned with V4 `VideoModelV4Result`.
|
|
9
|
+
*/
|
|
10
|
+
export type VideoResult = {
|
|
11
|
+
/**
|
|
12
|
+
* Generated videos as URLs, base64 strings, or binary data.
|
|
13
|
+
*/
|
|
14
|
+
videos: Array<VideoData>;
|
|
15
|
+
/**
|
|
16
|
+
* Warnings for the call, e.g. unsupported features.
|
|
17
|
+
*/
|
|
18
|
+
warnings: Array<Warning>;
|
|
19
|
+
/**
|
|
20
|
+
* Additional provider-specific metadata, keyed by provider name.
|
|
21
|
+
*/
|
|
22
|
+
provider_metadata: {
|
|
23
|
+
[key in string]: JsonValue;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* Response information for telemetry and debugging.
|
|
27
|
+
*/
|
|
28
|
+
response: VideoResponse;
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A warning issued by the provider (e.g. unsupported parameter).
|
|
3
|
+
*/
|
|
4
|
+
export type Warning = {
|
|
5
|
+
"Unsupported": {
|
|
6
|
+
feature: string;
|
|
7
|
+
details: string | null;
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
"Compatibility": {
|
|
11
|
+
feature: string;
|
|
12
|
+
details: string | null;
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
"Deprecated": {
|
|
16
|
+
setting: string;
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
"Other": {
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type * from './types/AiMuxError';
|
|
2
|
+
export type * from './types/AspectRatio';
|
|
3
|
+
export type * from './types/AudioChunk';
|
|
4
|
+
export type * from './types/AudioData';
|
|
5
|
+
export type * from './types/AudioInput';
|
|
6
|
+
export type * from './types/CallOptions';
|
|
7
|
+
export type * from './types/ContentPart';
|
|
8
|
+
export type * from './types/EmbeddingCallOptions';
|
|
9
|
+
export type * from './types/EmbeddingResponse';
|
|
10
|
+
export type * from './types/EmbeddingResult';
|
|
11
|
+
export type * from './types/EmbeddingUsage';
|
|
12
|
+
export type * from './types/FileBytes';
|
|
13
|
+
export type * from './types/FileData';
|
|
14
|
+
export type * from './types/FinishReason';
|
|
15
|
+
export type * from './types/FinishReasonUnified';
|
|
16
|
+
export type * from './types/FunctionTool';
|
|
17
|
+
export type * from './types/GenerateContent';
|
|
18
|
+
export type * from './types/GenerateResult';
|
|
19
|
+
export type * from './types/GenerateTextOptions';
|
|
20
|
+
export type * from './types/GenerateTextResult';
|
|
21
|
+
export type * from './types/ImageCallOptions';
|
|
22
|
+
export type * from './types/ImageFile';
|
|
23
|
+
export type * from './types/ImageFileData';
|
|
24
|
+
export type * from './types/ImageOutputs';
|
|
25
|
+
export type * from './types/ImageResponse';
|
|
26
|
+
export type * from './types/ImageResult';
|
|
27
|
+
export type * from './types/ImageUsage';
|
|
28
|
+
export type * from './types/InputAudioFormat';
|
|
29
|
+
export type * from './types/LanguageModelPromptMessage';
|
|
30
|
+
export type * from './types/MessageContent';
|
|
31
|
+
export type * from './types/ModelId';
|
|
32
|
+
export type * from './types/ModelMessage';
|
|
33
|
+
export type * from './types/ModelPrompt';
|
|
34
|
+
export type * from './types/ProviderTool';
|
|
35
|
+
export type * from './types/ReasoningEffort';
|
|
36
|
+
export type * from './types/RerankingCallOptions';
|
|
37
|
+
export type * from './types/RerankingDocuments';
|
|
38
|
+
export type * from './types/RerankingRank';
|
|
39
|
+
export type * from './types/RerankingResponse';
|
|
40
|
+
export type * from './types/RerankingResult';
|
|
41
|
+
export type * from './types/ResponseFormat';
|
|
42
|
+
export type * from './types/ResponseInfo';
|
|
43
|
+
export type * from './types/ResponseMetadata';
|
|
44
|
+
export type * from './types/Role';
|
|
45
|
+
export type * from './types/SearchCallOptions';
|
|
46
|
+
export type * from './types/SearchResponse';
|
|
47
|
+
export type * from './types/SearchResult';
|
|
48
|
+
export type * from './types/SearchResultItem';
|
|
49
|
+
export type * from './types/Size';
|
|
50
|
+
export type * from './types/SpeechCallOptions';
|
|
51
|
+
export type * from './types/SpeechRequest';
|
|
52
|
+
export type * from './types/SpeechResponse';
|
|
53
|
+
export type * from './types/SpeechResult';
|
|
54
|
+
export type * from './types/StreamPart';
|
|
55
|
+
export type * from './types/TokenUsage';
|
|
56
|
+
export type * from './types/Tool';
|
|
57
|
+
export type * from './types/ToolCall';
|
|
58
|
+
export type * from './types/ToolChoice';
|
|
59
|
+
export type * from './types/ToolResult';
|
|
60
|
+
export type * from './types/UploadFileCallOptions';
|
|
61
|
+
export type * from './types/UploadFileData';
|
|
62
|
+
export type * from './types/UploadFileResult';
|
|
63
|
+
export type * from './types/Usage';
|
|
64
|
+
export type * from './types/VideoCallOptions';
|
|
65
|
+
export type * from './types/VideoData';
|
|
66
|
+
export type * from './types/VideoFile';
|
|
67
|
+
export type * from './types/VideoFileData';
|
|
68
|
+
export type * from './types/VideoFrameImage';
|
|
69
|
+
export type * from './types/VideoFrameType';
|
|
70
|
+
export type * from './types/VideoResponse';
|
|
71
|
+
export type * from './types/VideoResult';
|
|
72
|
+
export type * from './types/Warning';
|
|
73
|
+
export type * from './types/RequestInfo';
|
package/dist/types.js
ADDED