@mux/ai 0.5.1 → 0.6.0
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 +1 -0
- package/dist/{index-D4eU6RMH.d.ts → index-B6ro59tn.d.ts} +175 -31
- package/dist/{index-B5bQ-IQk.d.ts → index-DAlX4SNJ.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +666 -28293
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +72 -28068
- package/dist/primitives/index.js.map +1 -1
- package/dist/{types-KcVfWtUl.d.ts → types-CqjLMB84.d.ts} +14 -7
- package/dist/workflows/index.d.ts +2 -2
- package/dist/workflows/index.js +793 -28436
- package/dist/workflows/index.js.map +1 -1
- package/package.json +8 -5
|
@@ -71,12 +71,6 @@ declare function decryptFromWorkflow<T>(payload: EncryptedPayload, key: Uint8Arr
|
|
|
71
71
|
interface MuxAIOptions {
|
|
72
72
|
/** Optional timeout (ms) for helper utilities that support request limits. */
|
|
73
73
|
timeout?: number;
|
|
74
|
-
/**
|
|
75
|
-
* Optional cancellation signal passed through to underlying AI SDK calls.
|
|
76
|
-
* When aborted, in-flight model requests will be
|
|
77
|
-
* cancelled where supported.
|
|
78
|
-
*/
|
|
79
|
-
abortSignal?: AbortSignal;
|
|
80
74
|
/**
|
|
81
75
|
* Optional credentials for workflow execution.
|
|
82
76
|
* Use encryptForWorkflow when running in Workflow Dev Kit environments.
|
|
@@ -181,6 +175,17 @@ interface VideoEmbeddingsResult {
|
|
|
181
175
|
embeddingDimensions: number;
|
|
182
176
|
generatedAt: string;
|
|
183
177
|
};
|
|
178
|
+
/** Workflow usage metadata (asset duration, thumbnails, etc.). */
|
|
179
|
+
usage?: TokenUsage;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Metadata attached to usage objects for workflow context.
|
|
183
|
+
*/
|
|
184
|
+
interface UsageMetadata {
|
|
185
|
+
/** Total asset duration in seconds. */
|
|
186
|
+
assetDurationSeconds?: number;
|
|
187
|
+
/** Number of thumbnails sampled for workflows that use thumbnails. */
|
|
188
|
+
thumbnailCount?: number;
|
|
184
189
|
}
|
|
185
190
|
/**
|
|
186
191
|
* Token usage breakdown returned by AI SDK providers.
|
|
@@ -197,6 +202,8 @@ interface TokenUsage {
|
|
|
197
202
|
reasoningTokens?: number;
|
|
198
203
|
/** Input tokens served from cache (reduces cost). */
|
|
199
204
|
cachedInputTokens?: number;
|
|
205
|
+
/** Workflow metadata (asset duration, thumbnails, etc.). */
|
|
206
|
+
metadata?: UsageMetadata;
|
|
200
207
|
}
|
|
201
208
|
|
|
202
|
-
export { type AssetTextTrack as A, type ChunkingStrategy as C, type Encrypted as E, type ImageSubmissionMode as I, type MuxAIOptions as M, type PlaybackPolicy as P, type ToneType as T, type VTTChunkingConfig as V, type WorkflowCredentials as W, type EncryptedPayload as a, type WorkflowCredentialsInput as b, type MuxAsset as c, decryptFromWorkflow as d, encryptForWorkflow as e, type PlaybackAsset as f, type TokenChunkingConfig as g, type TextChunk as h, type ChunkEmbedding as i, type VideoEmbeddingsResult as j, type TokenUsage as k };
|
|
209
|
+
export { type AssetTextTrack as A, type ChunkingStrategy as C, type Encrypted as E, type ImageSubmissionMode as I, type MuxAIOptions as M, type PlaybackPolicy as P, type ToneType as T, type UsageMetadata as U, type VTTChunkingConfig as V, type WorkflowCredentials as W, type EncryptedPayload as a, type WorkflowCredentialsInput as b, type MuxAsset as c, decryptFromWorkflow as d, encryptForWorkflow as e, type PlaybackAsset as f, type TokenChunkingConfig as g, type TextChunk as h, type ChunkEmbedding as i, type VideoEmbeddingsResult as j, type TokenUsage as k };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as AskQuestionsOptions, b as AskQuestionsResult, d as AskQuestionsType, U as AudioTranslationOptions, R as AudioTranslationResult, k as BurnedInCaptionsAnalysis, h as BurnedInCaptionsOptions, g as BurnedInCaptionsPromptOverrides, f as BurnedInCaptionsPromptSections, B as BurnedInCaptionsResult, C as Chapter, u as ChapterSystemPromptSections, t as ChaptersOptions, s as ChaptersPromptOverrides, r as ChaptersPromptSections, p as ChaptersResult, o as ChaptersType, E as EmbeddingsOptions, w as EmbeddingsResult, D as HiveModerationOutput, H as HiveModerationSource, F as ModerationOptions, z as ModerationProvider, M as ModerationResult, Q as Question, a as QuestionAnswer, c as QuestionAnswerType, S as SUMMARY_KEYWORD_LIMIT, O as SummarizationOptions, N as SummarizationPromptOverrides, L as SummarizationPromptSections, K as SummaryAndTagsResult, J as SummaryType, T as ThumbnailModerationScore, X as TranslationOptions, Z as TranslationPayload, W as TranslationResult, e as askQuestions, j as burnedInCaptionsSchema, m as chapterSchema, n as chaptersSchema, v as generateChapters, x as generateEmbeddings, y as generateVideoEmbeddings, G as getModerationScores, P as getSummaryAndTags, l as hasBurnedInCaptions, q as questionAnswerSchema, I as summarySchema, V as translateAudio, _ as translateCaptions, Y as translationSchema } from '../index-B6ro59tn.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@ai-sdk/anthropic';
|
|
4
4
|
import '@ai-sdk/google';
|
|
5
5
|
import '@ai-sdk/openai';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-CqjLMB84.js';
|
|
7
7
|
import '@mux/mux-node';
|