@mux/ai 0.3.0 → 0.4.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 +5 -5
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/workflows/index.js +7 -1
- package/dist/workflows/index.js.map +1 -1
- package/package.json +2 -2
package/dist/workflows/index.js
CHANGED
|
@@ -54,7 +54,7 @@ import { createOpenAI } from "@ai-sdk/openai";
|
|
|
54
54
|
var DEFAULT_LANGUAGE_MODELS = {
|
|
55
55
|
openai: "gpt-5.1",
|
|
56
56
|
anthropic: "claude-sonnet-4-5",
|
|
57
|
-
google: "gemini-
|
|
57
|
+
google: "gemini-3-flash-preview"
|
|
58
58
|
};
|
|
59
59
|
var DEFAULT_EMBEDDING_MODELS = {
|
|
60
60
|
openai: "text-embedding-3-small",
|
|
@@ -1482,6 +1482,7 @@ var summarySchema = z4.object({
|
|
|
1482
1482
|
title: z4.string(),
|
|
1483
1483
|
description: z4.string()
|
|
1484
1484
|
});
|
|
1485
|
+
var VALID_TONES = ["neutral", "playful", "professional"];
|
|
1485
1486
|
var TONE_INSTRUCTIONS = {
|
|
1486
1487
|
neutral: "Provide a clear, straightforward analysis.",
|
|
1487
1488
|
playful: "Channel your inner diva! Answer with maximum sass, wit, and playful attitude. Don't hold back - be cheeky, clever, and delightfully snarky. Make it pop!",
|
|
@@ -1667,6 +1668,11 @@ async function getSummaryAndTags(assetId, options) {
|
|
|
1667
1668
|
abortSignal: _abortSignal,
|
|
1668
1669
|
promptOverrides
|
|
1669
1670
|
} = options ?? {};
|
|
1671
|
+
if (!VALID_TONES.includes(tone)) {
|
|
1672
|
+
throw new Error(
|
|
1673
|
+
`Invalid tone "${tone}". Valid tones are: ${VALID_TONES.join(", ")}`
|
|
1674
|
+
);
|
|
1675
|
+
}
|
|
1670
1676
|
const config = await createWorkflowConfig(
|
|
1671
1677
|
{ ...options, model },
|
|
1672
1678
|
provider
|