@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.
@@ -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