@thanh01.pmt/curriculum-kit 1.0.8 → 1.0.9
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/ai/index.cjs +26 -0
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.mjs +26 -0
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +26 -0
- package/dist/media/index.cjs.map +1 -1
- package/dist/media/index.d.cts +1 -1
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.mjs +26 -0
- package/dist/media/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/{streamRunner-C7j5LKon.d.cts → streamRunner-BTTzbb-l.d.cts} +19 -0
- package/dist/{streamRunner-C7j5LKon.d.ts → streamRunner-BTTzbb-l.d.ts} +19 -0
- package/dist/workflow/index.cjs +26 -0
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +26 -0
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +22 -21
- package/LICENSE +0 -21
package/dist/media/index.d.cts
CHANGED
package/dist/media/index.d.ts
CHANGED
package/dist/media/index.mjs
CHANGED
|
@@ -649,6 +649,32 @@ Guidelines:
|
|
|
649
649
|
3. Keep technical terminology and official API symbols intact.
|
|
650
650
|
4. Format output using clean Markdown, clear sections, bullet points, and code blocks where required.
|
|
651
651
|
5. Do NOT use emojis in headings, tab titles, or UI navigation labels.`;
|
|
652
|
+
if (options.customInference) {
|
|
653
|
+
try {
|
|
654
|
+
const text = await options.customInference({
|
|
655
|
+
systemInstruction,
|
|
656
|
+
userPrompt: messages.map((m) => m.content).join("\n\n"),
|
|
657
|
+
messages,
|
|
658
|
+
temperature,
|
|
659
|
+
maxTokens,
|
|
660
|
+
onChunk: onChunk ?? (() => {
|
|
661
|
+
})
|
|
662
|
+
});
|
|
663
|
+
if (text && text.trim()) return text;
|
|
664
|
+
throw createAiInferenceError({
|
|
665
|
+
errorCode: "ERR_AI_ALL_PROVIDERS_FAILED",
|
|
666
|
+
message: "customInference returned empty output",
|
|
667
|
+
rawError: { customInference: "empty response" }
|
|
668
|
+
});
|
|
669
|
+
} catch (e) {
|
|
670
|
+
if (e?.errorCode || e?.name === "AiInferenceError") throw e;
|
|
671
|
+
throw createAiInferenceError({
|
|
672
|
+
errorCode: "ERR_AI_ALL_PROVIDERS_FAILED",
|
|
673
|
+
message: `customInference failed: ${e?.message || e}`,
|
|
674
|
+
rawError: { customInference: String(e?.message || e) }
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
}
|
|
652
678
|
const formattedMessages = [
|
|
653
679
|
{ role: "system", content: systemInstruction },
|
|
654
680
|
...messages.map((m) => ({
|