@thanh01.pmt/curriculum-kit 1.0.7 → 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 +3 -1
- package/dist/media/index.d.ts +3 -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 +1 -1
package/dist/media/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StreamRunnerOptions } from '../streamRunner-
|
|
1
|
+
import { S as StreamRunnerOptions } from '../streamRunner-BTTzbb-l.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Media Types — image generation, image search, video search cho học liệu.
|
|
@@ -116,6 +116,8 @@ interface MediaLedgerEntry {
|
|
|
116
116
|
status: MediaLedgerStatus;
|
|
117
117
|
/** Provider đã dùng (set khi done) */
|
|
118
118
|
provider?: string;
|
|
119
|
+
/** Inline Markdown credit (tác giả + nguồn + license) — từ multimedia-kit AttributionBuilder */
|
|
120
|
+
attribution?: string;
|
|
119
121
|
/** Path tương đối trong project sau khi done: _media/xxx.png */
|
|
120
122
|
relPath?: string;
|
|
121
123
|
/** Prompt cuối (đã enrich) — audit/debug */
|
package/dist/media/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StreamRunnerOptions } from '../streamRunner-
|
|
1
|
+
import { S as StreamRunnerOptions } from '../streamRunner-BTTzbb-l.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Media Types — image generation, image search, video search cho học liệu.
|
|
@@ -116,6 +116,8 @@ interface MediaLedgerEntry {
|
|
|
116
116
|
status: MediaLedgerStatus;
|
|
117
117
|
/** Provider đã dùng (set khi done) */
|
|
118
118
|
provider?: string;
|
|
119
|
+
/** Inline Markdown credit (tác giả + nguồn + license) — từ multimedia-kit AttributionBuilder */
|
|
120
|
+
attribution?: string;
|
|
119
121
|
/** Path tương đối trong project sau khi done: _media/xxx.png */
|
|
120
122
|
relPath?: string;
|
|
121
123
|
/** Prompt cuối (đã enrich) — audit/debug */
|
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) => ({
|