@thanh01.pmt/curriculum-kit 1.4.4 → 1.4.5
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 +8 -4
- 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 +8 -4
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +44 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +44 -16
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +8 -4
- 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 +8 -4
- 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-DtQq0HV_.d.cts → streamRunner-CYESG6IE.d.cts} +2 -2
- package/dist/{streamRunner-DtQq0HV_.d.ts → streamRunner-CYESG6IE.d.ts} +2 -2
- package/dist/workflow/index.cjs +8 -4
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +8 -4
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ai/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { M as ModelResolutionOptions } from '../provider-factory-DxzOVEmh.cjs';
|
|
|
2
2
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-DxzOVEmh.cjs';
|
|
3
3
|
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.cjs';
|
|
4
4
|
import * as ai from 'ai';
|
|
5
|
-
import { C as ChatMessage, S as StreamRunnerOptions, c as ChunkType } from '../streamRunner-
|
|
6
|
-
export { D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-
|
|
5
|
+
import { C as ChatMessage, S as StreamRunnerOptions, c as ChunkType } from '../streamRunner-CYESG6IE.cjs';
|
|
6
|
+
export { D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-CYESG6IE.cjs';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
9
|
interface LessonPromptInput {
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { M as ModelResolutionOptions } from '../provider-factory-DxzOVEmh.js';
|
|
|
2
2
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-DxzOVEmh.js';
|
|
3
3
|
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.js';
|
|
4
4
|
import * as ai from 'ai';
|
|
5
|
-
import { C as ChatMessage, S as StreamRunnerOptions, c as ChunkType } from '../streamRunner-
|
|
6
|
-
export { D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-
|
|
5
|
+
import { C as ChatMessage, S as StreamRunnerOptions, c as ChunkType } from '../streamRunner-CYESG6IE.js';
|
|
6
|
+
export { D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-CYESG6IE.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
9
|
interface LessonPromptInput {
|
package/dist/ai/index.mjs
CHANGED
|
@@ -251,8 +251,8 @@ function extractThoughtAndContent(rawText) {
|
|
|
251
251
|
content: content.trim()
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
var DEFAULT_ARTIFACT_STREAM_IDLE_MS =
|
|
255
|
-
var DEFAULT_ARTIFACT_STREAM_TOTAL_MS =
|
|
254
|
+
var DEFAULT_ARTIFACT_STREAM_IDLE_MS = 9e4;
|
|
255
|
+
var DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 48e4;
|
|
256
256
|
function createStreamAbortController(options) {
|
|
257
257
|
const envIdle = Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS);
|
|
258
258
|
const envTotal = Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS);
|
|
@@ -474,7 +474,9 @@ Guidelines:
|
|
|
474
474
|
if (isNvidiaPreferred || uniqueNvidiaModels.length > 0) {
|
|
475
475
|
for (const model of uniqueNvidiaModels) {
|
|
476
476
|
try {
|
|
477
|
-
const
|
|
477
|
+
const nvdIdle = options.idleTimeoutMs ?? 18e4;
|
|
478
|
+
const nvdTotal = options.timeoutMs ?? 6e5;
|
|
479
|
+
const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
|
|
478
480
|
const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
479
481
|
method: "POST",
|
|
480
482
|
headers: {
|
|
@@ -671,7 +673,9 @@ Guidelines:
|
|
|
671
673
|
const { provider, model } = target;
|
|
672
674
|
if (provider === "nvidia" && nvidiaKey && isProviderEnabled("nvidia")) {
|
|
673
675
|
try {
|
|
674
|
-
const
|
|
676
|
+
const nvdIdle = options.idleTimeoutMs ?? 18e4;
|
|
677
|
+
const nvdTotal = options.timeoutMs ?? 6e5;
|
|
678
|
+
const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
|
|
675
679
|
const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
676
680
|
method: "POST",
|
|
677
681
|
headers: {
|