@thanh01.pmt/curriculum-kit 1.4.34 → 1.4.35
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.cjs +34 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +34 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -29691,26 +29691,40 @@ Return concise JSON matching:
|
|
|
29691
29691
|
"technicalGotchas": ["Important safety or compatibility note 1", "Note 2"]
|
|
29692
29692
|
}`;
|
|
29693
29693
|
let rawContent = "";
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29713
|
-
|
|
29694
|
+
if (options.customInference) {
|
|
29695
|
+
rawContent = await options.customInference({
|
|
29696
|
+
systemInstruction: "You are an authoritative STEM & CS curriculum researcher. Output valid JSON only.",
|
|
29697
|
+
userPrompt: researchPrompt,
|
|
29698
|
+
messages: [{ role: "user", content: researchPrompt }],
|
|
29699
|
+
temperature: 0.2,
|
|
29700
|
+
maxTokens: 32768,
|
|
29701
|
+
onChunk: (token, type) => {
|
|
29702
|
+
if (type === "content") rawContent += token;
|
|
29703
|
+
if (type === "content" || type === "thought") onChunk?.(token, type);
|
|
29704
|
+
}
|
|
29705
|
+
}) || "";
|
|
29706
|
+
} else {
|
|
29707
|
+
await streamLLMWithFallback(
|
|
29708
|
+
"You are an authoritative STEM & CS curriculum researcher. Output valid JSON only.",
|
|
29709
|
+
researchPrompt,
|
|
29710
|
+
apiKeys,
|
|
29711
|
+
(chunk, type) => {
|
|
29712
|
+
if (type === "content") rawContent += chunk;
|
|
29713
|
+
onChunk?.(chunk, type);
|
|
29714
|
+
},
|
|
29715
|
+
options.model,
|
|
29716
|
+
options.provider,
|
|
29717
|
+
// Research may run live web grounding — generous budget, still idle-guarded.
|
|
29718
|
+
resolveStreamBudget(void 0, {
|
|
29719
|
+
idleMs: options.idleTimeoutMs,
|
|
29720
|
+
totalMs: options.timeoutMs,
|
|
29721
|
+
model: options.model,
|
|
29722
|
+
provider: options.provider
|
|
29723
|
+
}),
|
|
29724
|
+
options.signal,
|
|
29725
|
+
options.onProviderEvent
|
|
29726
|
+
);
|
|
29727
|
+
}
|
|
29714
29728
|
let parsedResearch = {
|
|
29715
29729
|
groundTruthSummary: `Verified ecosystem standards for ${projectName}`,
|
|
29716
29730
|
hardwareVersion: "Standard Environment",
|