@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.cjs
CHANGED
|
@@ -29703,26 +29703,40 @@ Return concise JSON matching:
|
|
|
29703
29703
|
"technicalGotchas": ["Important safety or compatibility note 1", "Note 2"]
|
|
29704
29704
|
}`;
|
|
29705
29705
|
let rawContent = "";
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29706
|
+
if (options.customInference) {
|
|
29707
|
+
rawContent = await options.customInference({
|
|
29708
|
+
systemInstruction: "You are an authoritative STEM & CS curriculum researcher. Output valid JSON only.",
|
|
29709
|
+
userPrompt: researchPrompt,
|
|
29710
|
+
messages: [{ role: "user", content: researchPrompt }],
|
|
29711
|
+
temperature: 0.2,
|
|
29712
|
+
maxTokens: 32768,
|
|
29713
|
+
onChunk: (token, type) => {
|
|
29714
|
+
if (type === "content") rawContent += token;
|
|
29715
|
+
if (type === "content" || type === "thought") onChunk?.(token, type);
|
|
29716
|
+
}
|
|
29717
|
+
}) || "";
|
|
29718
|
+
} else {
|
|
29719
|
+
await streamLLMWithFallback(
|
|
29720
|
+
"You are an authoritative STEM & CS curriculum researcher. Output valid JSON only.",
|
|
29721
|
+
researchPrompt,
|
|
29722
|
+
apiKeys,
|
|
29723
|
+
(chunk, type) => {
|
|
29724
|
+
if (type === "content") rawContent += chunk;
|
|
29725
|
+
onChunk?.(chunk, type);
|
|
29726
|
+
},
|
|
29727
|
+
options.model,
|
|
29728
|
+
options.provider,
|
|
29729
|
+
// Research may run live web grounding — generous budget, still idle-guarded.
|
|
29730
|
+
resolveStreamBudget(void 0, {
|
|
29731
|
+
idleMs: options.idleTimeoutMs,
|
|
29732
|
+
totalMs: options.timeoutMs,
|
|
29733
|
+
model: options.model,
|
|
29734
|
+
provider: options.provider
|
|
29735
|
+
}),
|
|
29736
|
+
options.signal,
|
|
29737
|
+
options.onProviderEvent
|
|
29738
|
+
);
|
|
29739
|
+
}
|
|
29726
29740
|
let parsedResearch = {
|
|
29727
29741
|
groundTruthSummary: `Verified ecosystem standards for ${projectName}`,
|
|
29728
29742
|
hardwareVersion: "Standard Environment",
|