@thanh01.pmt/curriculum-kit 1.4.4 → 1.4.6

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 CHANGED
@@ -258,8 +258,8 @@ function extractThoughtAndContent(rawText) {
258
258
  content: content.trim()
259
259
  };
260
260
  }
261
- var DEFAULT_ARTIFACT_STREAM_IDLE_MS = 45e3;
262
- var DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 42e4;
261
+ var DEFAULT_ARTIFACT_STREAM_IDLE_MS = 9e4;
262
+ var DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 48e4;
263
263
  function createStreamAbortController(options) {
264
264
  const envIdle = Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS);
265
265
  const envTotal = Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS);
@@ -481,7 +481,9 @@ Guidelines:
481
481
  if (isNvidiaPreferred || uniqueNvidiaModels.length > 0) {
482
482
  for (const model of uniqueNvidiaModels) {
483
483
  try {
484
- const idle = createStreamAbortController({ idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs });
484
+ const nvdIdle = options.idleTimeoutMs ?? 18e4;
485
+ const nvdTotal = options.timeoutMs ?? 6e5;
486
+ const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
485
487
  const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
486
488
  method: "POST",
487
489
  headers: {
@@ -678,7 +680,9 @@ Guidelines:
678
680
  const { provider, model } = target;
679
681
  if (provider === "nvidia" && nvidiaKey && isProviderEnabled("nvidia")) {
680
682
  try {
681
- const idle = createStreamAbortController({ idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs });
683
+ const nvdIdle = options.idleTimeoutMs ?? 18e4;
684
+ const nvdTotal = options.timeoutMs ?? 6e5;
685
+ const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
682
686
  const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
683
687
  method: "POST",
684
688
  headers: {