@mux/ai 0.3.0 → 0.3.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/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/workflows/index.js +6 -0
- package/dist/workflows/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1526,6 +1526,7 @@ var summarySchema = z4.object({
|
|
|
1526
1526
|
title: z4.string(),
|
|
1527
1527
|
description: z4.string()
|
|
1528
1528
|
});
|
|
1529
|
+
var VALID_TONES = ["neutral", "playful", "professional"];
|
|
1529
1530
|
var TONE_INSTRUCTIONS = {
|
|
1530
1531
|
neutral: "Provide a clear, straightforward analysis.",
|
|
1531
1532
|
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!",
|
|
@@ -1711,6 +1712,11 @@ async function getSummaryAndTags(assetId, options) {
|
|
|
1711
1712
|
abortSignal: _abortSignal,
|
|
1712
1713
|
promptOverrides
|
|
1713
1714
|
} = options ?? {};
|
|
1715
|
+
if (!VALID_TONES.includes(tone)) {
|
|
1716
|
+
throw new Error(
|
|
1717
|
+
`Invalid tone "${tone}". Valid tones are: ${VALID_TONES.join(", ")}`
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1714
1720
|
const config = await createWorkflowConfig(
|
|
1715
1721
|
{ ...options, model },
|
|
1716
1722
|
provider
|