@ax-llm/ax 11.0.41 → 11.0.42

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/index.cjs CHANGED
@@ -901,6 +901,7 @@ var AxBaseAI = class {
901
901
  rt;
902
902
  fetch;
903
903
  tracer;
904
+ timeout;
904
905
  models;
905
906
  modelInfo;
906
907
  modelUsage;
@@ -959,6 +960,7 @@ var AxBaseAI = class {
959
960
  this.debug = options.debug ?? false;
960
961
  this.rt = options.rateLimiter;
961
962
  this.fetch = options.fetch;
963
+ this.timeout = options.timeout;
962
964
  this.tracer = options.tracer;
963
965
  }
964
966
  getOptions() {
@@ -1142,6 +1144,7 @@ var AxBaseAI = class {
1142
1144
  url: this.apiURL,
1143
1145
  headers: await this.buildHeaders(apiConfig.headers),
1144
1146
  stream: modelConfig.stream,
1147
+ timeout: this.timeout,
1145
1148
  debug,
1146
1149
  fetch: this.fetch,
1147
1150
  span
@@ -1271,6 +1274,7 @@ var AxBaseAI = class {
1271
1274
  headers: await this.buildHeaders(apiConfig.headers),
1272
1275
  debug,
1273
1276
  fetch: this.fetch,
1277
+ timeout: this.timeout,
1274
1278
  span
1275
1279
  },
1276
1280
  reqValue
@@ -5949,7 +5953,7 @@ function* streamValues(sig, content, values, xstate) {
5949
5953
  const v = value.slice(s);
5950
5954
  if (v && v.length > 0) {
5951
5955
  yield { [key]: v };
5952
- xstate.streamedIndex[key] = s + 1;
5956
+ xstate.streamedIndex[key] = s + v.length;
5953
5957
  }
5954
5958
  continue;
5955
5959
  }