@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.
@@ -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-DtQq0HV_.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-DtQq0HV_.cjs';
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 {
@@ -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-DtQq0HV_.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-DtQq0HV_.js';
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 = 45e3;
255
- var DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 42e4;
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 idle = createStreamAbortController({ idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs });
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 idle = createStreamAbortController({ idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs });
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: {