@arcships/aimux 0.5.0 → 0.6.1
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 +92 -0
- package/dist/error.d.ts +28 -137
- package/dist/error.js +71 -100
- package/dist/generated/ops.d.ts +75 -0
- package/dist/generated/ops.js +80 -0
- package/dist/generated/types.d.ts +5613 -0
- package/dist/{types/CallOptions.js → generated/types.js} +1 -0
- package/dist/index.d.ts +144 -211
- package/dist/index.js +314 -344
- package/dist/native.d.ts +29 -1
- package/dist/native.js +99 -29
- package/dist/types.d.ts +1 -144
- package/dist/types.js +0 -3
- package/index.d.ts +21 -545
- package/index.js +57 -112
- package/package.json +16 -13
- package/dist/types/AiMuxError.d.ts +0 -66
- package/dist/types/AiMuxError.js +0 -2
- package/dist/types/ApiCallError.d.ts +0 -75
- package/dist/types/ApiCallError.js +0 -2
- package/dist/types/AspectRatio.d.ts +0 -11
- package/dist/types/AspectRatio.js +0 -3
- package/dist/types/AudioChunk.d.ts +0 -8
- package/dist/types/AudioChunk.js +0 -3
- package/dist/types/AudioData.d.ts +0 -11
- package/dist/types/AudioData.js +0 -3
- package/dist/types/AudioInput.d.ts +0 -8
- package/dist/types/AudioInput.js +0 -3
- package/dist/types/BreakKind.d.ts +0 -1
- package/dist/types/BreakKind.js +0 -3
- package/dist/types/CallOptions.d.ts +0 -117
- package/dist/types/CatalogueSource.d.ts +0 -4
- package/dist/types/CatalogueSource.js +0 -3
- package/dist/types/ChatCompletion.d.ts +0 -16
- package/dist/types/ChatCompletion.js +0 -2
- package/dist/types/ChatCompletionChoice.d.ts +0 -8
- package/dist/types/ChatCompletionChoice.js +0 -2
- package/dist/types/ChatCompletionChunk.d.ts +0 -15
- package/dist/types/ChatCompletionChunk.js +0 -2
- package/dist/types/ChatCompletionChunkChoice.d.ts +0 -8
- package/dist/types/ChatCompletionChunkChoice.js +0 -2
- package/dist/types/ChatCompletionChunkFunction.d.ts +0 -4
- package/dist/types/ChatCompletionChunkFunction.js +0 -3
- package/dist/types/ChatCompletionChunkToolCall.d.ts +0 -7
- package/dist/types/ChatCompletionChunkToolCall.js +0 -2
- package/dist/types/ChatCompletionDelta.d.ts +0 -7
- package/dist/types/ChatCompletionDelta.js +0 -2
- package/dist/types/ChatCompletionFunction.d.ts +0 -4
- package/dist/types/ChatCompletionFunction.js +0 -3
- package/dist/types/ChatCompletionMessage.d.ts +0 -9
- package/dist/types/ChatCompletionMessage.js +0 -2
- package/dist/types/ChatCompletionToolCall.d.ts +0 -6
- package/dist/types/ChatCompletionToolCall.js +0 -2
- package/dist/types/ChatCompletionUsage.d.ts +0 -9
- package/dist/types/ChatCompletionUsage.js +0 -2
- package/dist/types/CompletionTokensDetails.d.ts +0 -3
- package/dist/types/CompletionTokensDetails.js +0 -3
- package/dist/types/ContentPart.d.ts +0 -112
- package/dist/types/ContentPart.js +0 -2
- package/dist/types/EmbeddingCallOptions.d.ts +0 -33
- package/dist/types/EmbeddingCallOptions.js +0 -2
- package/dist/types/EmbeddingResponse.d.ts +0 -16
- package/dist/types/EmbeddingResponse.js +0 -2
- package/dist/types/EmbeddingResult.d.ts +0 -33
- package/dist/types/EmbeddingResult.js +0 -2
- package/dist/types/EmbeddingUsage.d.ts +0 -9
- package/dist/types/EmbeddingUsage.js +0 -3
- package/dist/types/FileBytes.d.ts +0 -12
- package/dist/types/FileBytes.js +0 -3
- package/dist/types/FileData.d.ts +0 -25
- package/dist/types/FileData.js +0 -2
- package/dist/types/FilePart.d.ts +0 -8
- package/dist/types/FilePart.js +0 -2
- package/dist/types/Fingerprint.d.ts +0 -21
- package/dist/types/Fingerprint.js +0 -3
- package/dist/types/FinishReason.d.ts +0 -14
- package/dist/types/FinishReason.js +0 -2
- package/dist/types/FinishReasonUnified.d.ts +0 -4
- package/dist/types/FinishReasonUnified.js +0 -3
- package/dist/types/FunctionTool.d.ts +0 -35
- package/dist/types/FunctionTool.js +0 -2
- package/dist/types/GenerateContent.d.ts +0 -88
- package/dist/types/GenerateContent.js +0 -2
- package/dist/types/GenerateObjectResult.d.ts +0 -48
- package/dist/types/GenerateObjectResult.js +0 -2
- package/dist/types/GenerateResult.d.ts +0 -45
- package/dist/types/GenerateResult.js +0 -2
- package/dist/types/GenerateTextOptions.d.ts +0 -62
- package/dist/types/GenerateTextOptions.js +0 -2
- package/dist/types/GenerateTextResult.d.ts +0 -81
- package/dist/types/GenerateTextResult.js +0 -2
- package/dist/types/HttpExchange.d.ts +0 -34
- package/dist/types/HttpExchange.js +0 -2
- package/dist/types/HttpRecord.d.ts +0 -12
- package/dist/types/HttpRecord.js +0 -3
- package/dist/types/ImageCallOptions.d.ts +0 -63
- package/dist/types/ImageCallOptions.js +0 -2
- package/dist/types/ImageFile.d.ts +0 -25
- package/dist/types/ImageFile.js +0 -2
- package/dist/types/ImageFileData.d.ts +0 -8
- package/dist/types/ImageFileData.js +0 -3
- package/dist/types/ImageOutputs.d.ts +0 -14
- package/dist/types/ImageOutputs.js +0 -3
- package/dist/types/ImageResponse.d.ts +0 -19
- package/dist/types/ImageResponse.js +0 -3
- package/dist/types/ImageResult.d.ts +0 -34
- package/dist/types/ImageResult.js +0 -2
- package/dist/types/ImageUsage.d.ts +0 -19
- package/dist/types/ImageUsage.js +0 -3
- package/dist/types/InputAudioFormat.d.ts +0 -13
- package/dist/types/InputAudioFormat.js +0 -3
- package/dist/types/InputRecord.d.ts +0 -16
- package/dist/types/InputRecord.js +0 -2
- package/dist/types/LanguageModelPromptMessage.d.ts +0 -20
- package/dist/types/LanguageModelPromptMessage.js +0 -2
- package/dist/types/MessageContent.d.ts +0 -5
- package/dist/types/MessageContent.js +0 -2
- package/dist/types/Modality.d.ts +0 -4
- package/dist/types/Modality.js +0 -3
- package/dist/types/ModelCapabilities.d.ts +0 -21
- package/dist/types/ModelCapabilities.js +0 -3
- package/dist/types/ModelCost.d.ts +0 -10
- package/dist/types/ModelCost.js +0 -3
- package/dist/types/ModelId.d.ts +0 -7
- package/dist/types/ModelId.js +0 -3
- package/dist/types/ModelLimits.d.ts +0 -17
- package/dist/types/ModelLimits.js +0 -3
- package/dist/types/ModelMessage.d.ts +0 -9
- package/dist/types/ModelMessage.js +0 -2
- package/dist/types/ModelModalities.d.ts +0 -8
- package/dist/types/ModelModalities.js +0 -2
- package/dist/types/ModelPrompt.d.ts +0 -7
- package/dist/types/ModelPrompt.js +0 -2
- package/dist/types/ModelSpec.d.ts +0 -33
- package/dist/types/ModelSpec.js +0 -2
- package/dist/types/ModelType.d.ts +0 -4
- package/dist/types/ModelType.js +0 -3
- package/dist/types/OutcomeRecord.d.ts +0 -19
- package/dist/types/OutcomeRecord.js +0 -2
- package/dist/types/OutcomeStatus.d.ts +0 -4
- package/dist/types/OutcomeStatus.js +0 -3
- package/dist/types/PrefixBreak.d.ts +0 -11
- package/dist/types/PrefixBreak.js +0 -2
- package/dist/types/PromptTokensDetails.d.ts +0 -4
- package/dist/types/PromptTokensDetails.js +0 -3
- package/dist/types/ProviderAuditSpec.d.ts +0 -33
- package/dist/types/ProviderAuditSpec.js +0 -2
- package/dist/types/ProviderFamily.d.ts +0 -5
- package/dist/types/ProviderFamily.js +0 -3
- package/dist/types/ProviderName.d.ts +0 -258
- package/dist/types/ProviderName.js +0 -262
- package/dist/types/ProviderRecord.d.ts +0 -30
- package/dist/types/ProviderRecord.js +0 -2
- package/dist/types/ProviderTool.d.ts +0 -24
- package/dist/types/ProviderTool.js +0 -2
- package/dist/types/RawToolCall.d.ts +0 -16
- package/dist/types/RawToolCall.js +0 -2
- package/dist/types/ReasoningEffort.d.ts +0 -7
- package/dist/types/ReasoningEffort.js +0 -3
- package/dist/types/ReasoningMode.d.ts +0 -4
- package/dist/types/ReasoningMode.js +0 -3
- package/dist/types/ReasoningPart.d.ts +0 -9
- package/dist/types/ReasoningPart.js +0 -3
- package/dist/types/ReasoningSpec.d.ts +0 -39
- package/dist/types/ReasoningSpec.js +0 -2
- package/dist/types/ReasoningVisibility.d.ts +0 -4
- package/dist/types/ReasoningVisibility.js +0 -3
- package/dist/types/Recording.d.ts +0 -56
- package/dist/types/Recording.js +0 -2
- package/dist/types/RequestCacheHints.d.ts +0 -9
- package/dist/types/RequestCacheHints.js +0 -3
- package/dist/types/RequestInfo.d.ts +0 -12
- package/dist/types/RequestInfo.js +0 -2
- package/dist/types/RerankingCallOptions.d.ts +0 -42
- package/dist/types/RerankingCallOptions.js +0 -2
- package/dist/types/RerankingDocuments.d.ts +0 -15
- package/dist/types/RerankingDocuments.js +0 -2
- package/dist/types/RerankingRank.d.ts +0 -13
- package/dist/types/RerankingRank.js +0 -3
- package/dist/types/RerankingResponse.d.ts +0 -28
- package/dist/types/RerankingResponse.js +0 -2
- package/dist/types/RerankingResult.d.ts +0 -31
- package/dist/types/RerankingResult.js +0 -2
- package/dist/types/ResponseFormat.d.ts +0 -11
- package/dist/types/ResponseFormat.js +0 -2
- package/dist/types/ResponseInfo.d.ts +0 -30
- package/dist/types/ResponseInfo.js +0 -2
- package/dist/types/ResponseMetadata.d.ts +0 -8
- package/dist/types/ResponseMetadata.js +0 -3
- package/dist/types/ResponseRecord.d.ts +0 -13
- package/dist/types/ResponseRecord.js +0 -3
- package/dist/types/RetryError.d.ts +0 -9
- package/dist/types/RetryError.js +0 -2
- package/dist/types/RetryErrorReason.d.ts +0 -4
- package/dist/types/RetryErrorReason.js +0 -3
- package/dist/types/Role.d.ts +0 -4
- package/dist/types/Role.js +0 -3
- package/dist/types/RuntimeModel.d.ts +0 -22
- package/dist/types/RuntimeModel.js +0 -3
- package/dist/types/SearchCallOptions.d.ts +0 -55
- package/dist/types/SearchCallOptions.js +0 -2
- package/dist/types/SearchResponse.d.ts +0 -16
- package/dist/types/SearchResponse.js +0 -2
- package/dist/types/SearchResult.d.ts +0 -32
- package/dist/types/SearchResult.js +0 -2
- package/dist/types/SearchResultItem.d.ts +0 -33
- package/dist/types/SearchResultItem.js +0 -2
- package/dist/types/SessionCall.d.ts +0 -20
- package/dist/types/SessionCall.js +0 -3
- package/dist/types/SessionChainView.d.ts +0 -10
- package/dist/types/SessionChainView.js +0 -2
- package/dist/types/SessionSource.d.ts +0 -4
- package/dist/types/SessionSource.js +0 -3
- package/dist/types/SessionStepStat.d.ts +0 -27
- package/dist/types/SessionStepStat.js +0 -2
- package/dist/types/SessionView.d.ts +0 -16
- package/dist/types/SessionView.js +0 -2
- package/dist/types/Size.d.ts +0 -11
- package/dist/types/Size.js +0 -3
- package/dist/types/SourcePart.d.ts +0 -9
- package/dist/types/SourcePart.js +0 -3
- package/dist/types/SpeechCallOptions.d.ts +0 -56
- package/dist/types/SpeechCallOptions.js +0 -2
- package/dist/types/SpeechRequest.d.ts +0 -10
- package/dist/types/SpeechRequest.js +0 -2
- package/dist/types/SpeechResponse.d.ts +0 -24
- package/dist/types/SpeechResponse.js +0 -2
- package/dist/types/SpeechResult.d.ts +0 -34
- package/dist/types/SpeechResult.js +0 -2
- package/dist/types/StreamPart.d.ts +0 -173
- package/dist/types/StreamPart.js +0 -2
- package/dist/types/StreamTextResultAggregated.d.ts +0 -74
- package/dist/types/StreamTextResultAggregated.js +0 -2
- package/dist/types/TimeoutConfiguration.d.ts +0 -32
- package/dist/types/TimeoutConfiguration.js +0 -3
- package/dist/types/TimingRecord.d.ts +0 -7
- package/dist/types/TimingRecord.js +0 -3
- package/dist/types/TokenUsage.d.ts +0 -29
- package/dist/types/TokenUsage.js +0 -3
- package/dist/types/Tool.d.ts +0 -12
- package/dist/types/Tool.js +0 -2
- package/dist/types/ToolCall.d.ts +0 -48
- package/dist/types/ToolCall.js +0 -2
- package/dist/types/ToolCallRepairReply.d.ts +0 -19
- package/dist/types/ToolCallRepairReply.js +0 -2
- package/dist/types/ToolChoice.d.ts +0 -12
- package/dist/types/ToolChoice.js +0 -3
- package/dist/types/ToolResult.d.ts +0 -22
- package/dist/types/ToolResult.js +0 -2
- package/dist/types/TraceFilter.d.ts +0 -9
- package/dist/types/TraceFilter.js +0 -3
- package/dist/types/TraceRecord.d.ts +0 -54
- package/dist/types/TraceRecord.js +0 -2
- package/dist/types/TraceStats.d.ts +0 -20
- package/dist/types/TraceStats.js +0 -3
- package/dist/types/TranscriptionCallOptions.d.ts +0 -38
- package/dist/types/TranscriptionCallOptions.js +0 -2
- package/dist/types/TranscriptionRequest.d.ts +0 -9
- package/dist/types/TranscriptionRequest.js +0 -3
- package/dist/types/TranscriptionResponse.d.ts +0 -24
- package/dist/types/TranscriptionResponse.js +0 -2
- package/dist/types/TranscriptionResult.d.ts +0 -46
- package/dist/types/TranscriptionResult.js +0 -2
- package/dist/types/TranscriptionSegment.d.ts +0 -17
- package/dist/types/TranscriptionSegment.js +0 -3
- package/dist/types/TranscriptionStreamPart.d.ts +0 -70
- package/dist/types/TranscriptionStreamPart.js +0 -2
- package/dist/types/UploadFileCallOptions.d.ts +0 -27
- package/dist/types/UploadFileCallOptions.js +0 -2
- package/dist/types/UploadFileData.d.ts +0 -17
- package/dist/types/UploadFileData.js +0 -2
- package/dist/types/UploadFileResult.d.ts +0 -35
- package/dist/types/UploadFileResult.js +0 -2
- package/dist/types/Usage.d.ts +0 -13
- package/dist/types/Usage.js +0 -2
- package/dist/types/UsageSnapshot.d.ts +0 -18
- package/dist/types/UsageSnapshot.js +0 -2
- package/dist/types/Verdict.d.ts +0 -23
- package/dist/types/Verdict.js +0 -2
- package/dist/types/VerdictConfidence.d.ts +0 -4
- package/dist/types/VerdictConfidence.js +0 -3
- package/dist/types/VerdictKind.d.ts +0 -4
- package/dist/types/VerdictKind.js +0 -3
- package/dist/types/VideoCallOptions.d.ts +0 -84
- package/dist/types/VideoCallOptions.js +0 -2
- package/dist/types/VideoData.d.ts +0 -22
- package/dist/types/VideoData.js +0 -3
- package/dist/types/VideoFile.d.ts +0 -29
- package/dist/types/VideoFile.js +0 -2
- package/dist/types/VideoFileData.d.ts +0 -8
- package/dist/types/VideoFileData.js +0 -3
- package/dist/types/VideoFrameImage.d.ts +0 -17
- package/dist/types/VideoFrameImage.js +0 -2
- package/dist/types/VideoFrameType.d.ts +0 -6
- package/dist/types/VideoFrameType.js +0 -3
- package/dist/types/VideoPollOptions.d.ts +0 -13
- package/dist/types/VideoPollOptions.js +0 -3
- package/dist/types/VideoResponse.d.ts +0 -19
- package/dist/types/VideoResponse.js +0 -3
- package/dist/types/VideoResult.d.ts +0 -29
- package/dist/types/VideoResult.js +0 -2
- package/dist/types/Warning.d.ts +0 -23
- package/dist/types/Warning.js +0 -3
- package/dist/types/serde_json/JsonValue.d.ts +0 -3
- package/dist/types/serde_json/JsonValue.js +0 -3
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { TranscriptionRequest } from "./TranscriptionRequest";
|
|
2
|
-
import type { TranscriptionResponse } from "./TranscriptionResponse";
|
|
3
|
-
import type { TranscriptionSegment } from "./TranscriptionSegment";
|
|
4
|
-
import type { Warning } from "./Warning";
|
|
5
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
6
|
-
/**
|
|
7
|
-
* The result of [`TranscriptionModel::do_generate`].
|
|
8
|
-
*
|
|
9
|
-
* Aligned with V4 `TranscriptionModelV4Result`.
|
|
10
|
-
*/
|
|
11
|
-
export type TranscriptionResult = {
|
|
12
|
-
/**
|
|
13
|
-
* The complete transcribed text from the audio.
|
|
14
|
-
*/
|
|
15
|
-
text: string;
|
|
16
|
-
/**
|
|
17
|
-
* Transcript segments with timing information.
|
|
18
|
-
*/
|
|
19
|
-
segments: Array<TranscriptionSegment>;
|
|
20
|
-
/**
|
|
21
|
-
* The detected language (ISO 639-1 code, e.g. `"en"`), if detected.
|
|
22
|
-
*/
|
|
23
|
-
language: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* The total duration of the audio in seconds, if determined.
|
|
26
|
-
*/
|
|
27
|
-
duration_in_seconds: number | null;
|
|
28
|
-
/**
|
|
29
|
-
* Warnings for the call, e.g. unsupported settings.
|
|
30
|
-
*/
|
|
31
|
-
warnings: Array<Warning>;
|
|
32
|
-
/**
|
|
33
|
-
* Optional request information for telemetry and debugging.
|
|
34
|
-
*/
|
|
35
|
-
request: TranscriptionRequest | null;
|
|
36
|
-
/**
|
|
37
|
-
* Response information for telemetry and debugging.
|
|
38
|
-
*/
|
|
39
|
-
response: TranscriptionResponse;
|
|
40
|
-
/**
|
|
41
|
-
* Additional provider-specific metadata, keyed by provider name.
|
|
42
|
-
*/
|
|
43
|
-
provider_metadata: {
|
|
44
|
-
[key in string]: JsonValue;
|
|
45
|
-
} | null;
|
|
46
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A transcript segment with timing information.
|
|
3
|
-
*/
|
|
4
|
-
export type TranscriptionSegment = {
|
|
5
|
-
/**
|
|
6
|
-
* The text content of this segment.
|
|
7
|
-
*/
|
|
8
|
-
text: string;
|
|
9
|
-
/**
|
|
10
|
-
* The start time of this segment in seconds.
|
|
11
|
-
*/
|
|
12
|
-
start_second: number;
|
|
13
|
-
/**
|
|
14
|
-
* The end time of this segment in seconds.
|
|
15
|
-
*/
|
|
16
|
-
end_second: number;
|
|
17
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { TranscriptionSegment } from "./TranscriptionSegment";
|
|
2
|
-
import type { Warning } from "./Warning";
|
|
3
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
4
|
-
/**
|
|
5
|
-
* A single chunk in the stream returned by `do_stream`.
|
|
6
|
-
*
|
|
7
|
-
* Aligned with V4 `TranscriptionModelV4StreamPart`.
|
|
8
|
-
*/
|
|
9
|
-
export type TranscriptionStreamPart = {
|
|
10
|
-
"StreamStart": {
|
|
11
|
-
warnings: Array<Warning>;
|
|
12
|
-
};
|
|
13
|
-
} | {
|
|
14
|
-
"TranscriptDelta": {
|
|
15
|
-
id: string | null;
|
|
16
|
-
delta: string;
|
|
17
|
-
provider_metadata: {
|
|
18
|
-
[key in string]: JsonValue;
|
|
19
|
-
} | null;
|
|
20
|
-
};
|
|
21
|
-
} | {
|
|
22
|
-
"TranscriptPartial": {
|
|
23
|
-
id: string | null;
|
|
24
|
-
text: string;
|
|
25
|
-
start_second: number | null;
|
|
26
|
-
duration_in_seconds: number | null;
|
|
27
|
-
channel_index: number | null;
|
|
28
|
-
provider_metadata: {
|
|
29
|
-
[key in string]: JsonValue;
|
|
30
|
-
} | null;
|
|
31
|
-
};
|
|
32
|
-
} | {
|
|
33
|
-
"TranscriptFinal": {
|
|
34
|
-
id: string | null;
|
|
35
|
-
text: string;
|
|
36
|
-
start_second: number | null;
|
|
37
|
-
end_second: number | null;
|
|
38
|
-
channel_index: number | null;
|
|
39
|
-
provider_metadata: {
|
|
40
|
-
[key in string]: JsonValue;
|
|
41
|
-
} | null;
|
|
42
|
-
};
|
|
43
|
-
} | {
|
|
44
|
-
"ResponseMetadata": {
|
|
45
|
-
timestamp: string | null;
|
|
46
|
-
model_id: string | null;
|
|
47
|
-
headers: {
|
|
48
|
-
[key in string]: string;
|
|
49
|
-
} | null;
|
|
50
|
-
body: JsonValue | null;
|
|
51
|
-
};
|
|
52
|
-
} | {
|
|
53
|
-
"Finish": {
|
|
54
|
-
text: string;
|
|
55
|
-
segments: Array<TranscriptionSegment>;
|
|
56
|
-
language: string | null;
|
|
57
|
-
duration_in_seconds: number | null;
|
|
58
|
-
provider_metadata: {
|
|
59
|
-
[key in string]: JsonValue;
|
|
60
|
-
} | null;
|
|
61
|
-
};
|
|
62
|
-
} | {
|
|
63
|
-
"Raw": {
|
|
64
|
-
raw_value: JsonValue;
|
|
65
|
-
};
|
|
66
|
-
} | {
|
|
67
|
-
"Error": {
|
|
68
|
-
error: JsonValue;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/types/Usage.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/types/Usage.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* Token usage snapshot (7 flat fields + raw passthrough).
|
|
4
|
-
*/
|
|
5
|
-
export type UsageSnapshot = {
|
|
6
|
-
input_total: bigint | null;
|
|
7
|
-
input_no_cache: bigint | null;
|
|
8
|
-
cache_read: bigint | null;
|
|
9
|
-
cache_write: bigint | null;
|
|
10
|
-
output_total: bigint | null;
|
|
11
|
-
output_text: bigint | null;
|
|
12
|
-
output_reasoning: bigint | null;
|
|
13
|
-
/**
|
|
14
|
-
* Raw provider usage payload (opaque passthrough; numbers only — no
|
|
15
|
-
* prompt text).
|
|
16
|
-
*/
|
|
17
|
-
raw?: JsonValue | null;
|
|
18
|
-
};
|
package/dist/types/Verdict.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { VerdictConfidence } from "./VerdictConfidence";
|
|
2
|
-
import type { VerdictKind } from "./VerdictKind";
|
|
3
|
-
/**
|
|
4
|
-
* A verdict for one call.
|
|
5
|
-
*/
|
|
6
|
-
export type Verdict = {
|
|
7
|
-
kind: VerdictKind;
|
|
8
|
-
confidence: VerdictConfidence;
|
|
9
|
-
/**
|
|
10
|
-
* Violated rule ids (R-1.1 / R-1.2 / …).
|
|
11
|
-
*/
|
|
12
|
-
violated: Array<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Expected upper bound U (tokens).
|
|
15
|
-
*/
|
|
16
|
-
expected_max: bigint;
|
|
17
|
-
claimed: bigint;
|
|
18
|
-
/**
|
|
19
|
-
* Client-side LCP (bytes).
|
|
20
|
-
*/
|
|
21
|
-
lcp_bytes: bigint;
|
|
22
|
-
notes: Array<string>;
|
|
23
|
-
};
|
package/dist/types/Verdict.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { AspectRatio } from "./AspectRatio";
|
|
2
|
-
import type { Size } from "./Size";
|
|
3
|
-
import type { TimeoutConfiguration } from "./TimeoutConfiguration";
|
|
4
|
-
import type { VideoFile } from "./VideoFile";
|
|
5
|
-
import type { VideoFrameImage } from "./VideoFrameImage";
|
|
6
|
-
import type { VideoPollOptions } from "./VideoPollOptions";
|
|
7
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
8
|
-
/**
|
|
9
|
-
* Options passed to [`VideoModel::do_start`] and [`VideoModel::do_status`].
|
|
10
|
-
*
|
|
11
|
-
* Aligned with V4 `VideoModelV4CallOptions`.
|
|
12
|
-
*/
|
|
13
|
-
export type VideoCallOptions = {
|
|
14
|
-
/**
|
|
15
|
-
* Text prompt for the video generation. `None` when not required.
|
|
16
|
-
*/
|
|
17
|
-
prompt: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Number of videos to generate. Default `1`; most models only support
|
|
20
|
-
* `n = 1` due to computational cost.
|
|
21
|
-
*/
|
|
22
|
-
n: number;
|
|
23
|
-
/**
|
|
24
|
-
* Aspect ratio, in `{width}:{height}` format (e.g. `"16:9"`).
|
|
25
|
-
*/
|
|
26
|
-
aspect_ratio: AspectRatio | null;
|
|
27
|
-
/**
|
|
28
|
-
* Resolution, in `{width}x{height}` format (e.g. `"1280x720"`).
|
|
29
|
-
*/
|
|
30
|
-
resolution: Size | null;
|
|
31
|
-
/**
|
|
32
|
-
* Duration of the video in seconds. Typically 3–10 seconds.
|
|
33
|
-
*/
|
|
34
|
-
duration: number | null;
|
|
35
|
-
/**
|
|
36
|
-
* Frames per second. Common values: 24, 30, 60.
|
|
37
|
-
*/
|
|
38
|
-
fps: number | null;
|
|
39
|
-
/**
|
|
40
|
-
* Seed for deterministic generation. `None` uses a random seed.
|
|
41
|
-
*/
|
|
42
|
-
seed: number | null;
|
|
43
|
-
/**
|
|
44
|
-
* Input image for image-to-video generation (the starting frame).
|
|
45
|
-
*/
|
|
46
|
-
image: VideoFile | null;
|
|
47
|
-
/**
|
|
48
|
-
* Role-tagged image inputs for first-last-frame generation.
|
|
49
|
-
*/
|
|
50
|
-
frame_images: Array<VideoFrameImage> | null;
|
|
51
|
-
/**
|
|
52
|
-
* Reference inputs for reference-to-video generation (images or videos).
|
|
53
|
-
*/
|
|
54
|
-
input_references: Array<VideoFile> | null;
|
|
55
|
-
/**
|
|
56
|
-
* Whether the model should generate audio alongside the video.
|
|
57
|
-
*/
|
|
58
|
-
generate_audio: boolean | null;
|
|
59
|
-
/**
|
|
60
|
-
* Additional provider-specific options, keyed by provider name.
|
|
61
|
-
*/
|
|
62
|
-
provider_options: {
|
|
63
|
-
[key in string]: JsonValue;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Per-call retry override. `None` uses the model default.
|
|
67
|
-
*/
|
|
68
|
-
max_retries: number | null;
|
|
69
|
-
/**
|
|
70
|
-
* Per-call poll pacing override for the start/status flow. Unset fields
|
|
71
|
-
* fall back to the model's [`VideoModel::poll_config`].
|
|
72
|
-
*/
|
|
73
|
-
poll: VideoPollOptions | null;
|
|
74
|
-
/**
|
|
75
|
-
* Per-call operation timeout.
|
|
76
|
-
*/
|
|
77
|
-
timeout: TimeoutConfiguration | null;
|
|
78
|
-
/**
|
|
79
|
-
* Additional HTTP headers to send with the request.
|
|
80
|
-
*/
|
|
81
|
-
headers: {
|
|
82
|
-
[key in string]: string;
|
|
83
|
-
} | null;
|
|
84
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/types/VideoData.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/types/VideoFile.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-call poll pacing for video generation (AI SDK `generateVideo` `poll`).
|
|
3
|
-
*/
|
|
4
|
-
export type VideoPollOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* Delay between consecutive status checks, in milliseconds.
|
|
7
|
-
*/
|
|
8
|
-
interval_ms: number | null;
|
|
9
|
-
/**
|
|
10
|
-
* Maximum total time to wait for completion, in milliseconds.
|
|
11
|
-
*/
|
|
12
|
-
timeout_ms: number | null;
|
|
13
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
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 final result of a video generation operation.
|
|
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
|
-
};
|
package/dist/types/Warning.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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/Warning.js
DELETED