ai 7.0.38 → 7.0.39

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.
@@ -96,8 +96,9 @@ const originalGenerateId = createIdGenerator({ prefix: 'aiobj', size: 24 });
96
96
  * - 'enum': The output is an enum.
97
97
  * - 'no-schema': The output is not a schema.
98
98
  *
99
- * @param experimental_repairText - A function that attempts to repair the raw output of the model
99
+ * @param repairText - A function that attempts to repair the raw output of the model
100
100
  * to enable JSON parsing.
101
+ * @param experimental_repairText - Deprecated alias for `repairText`.
101
102
  *
102
103
  * @param telemetry - Optional telemetry configuration.
103
104
  *
@@ -169,6 +170,14 @@ export async function generateObject<
169
170
  * A function that attempts to repair the raw output of the model
170
171
  * to enable JSON parsing.
171
172
  */
173
+ repairText?: RepairTextFunction;
174
+
175
+ /**
176
+ * A function that attempts to repair the raw output of the model
177
+ * to enable JSON parsing.
178
+ *
179
+ * @deprecated Use `repairText` instead.
180
+ */
172
181
  experimental_repairText?: RepairTextFunction;
173
182
 
174
183
  /**
@@ -265,7 +274,8 @@ export async function generateObject<
265
274
  maxRetries: maxRetriesArg,
266
275
  abortSignal,
267
276
  headers,
268
- experimental_repairText: repairText,
277
+ experimental_repairText,
278
+ repairText = experimental_repairText,
269
279
  experimental_telemetry,
270
280
  telemetry = experimental_telemetry,
271
281
  experimental_download: download,
@@ -168,6 +168,10 @@ export type StreamObjectOnFinishCallback<RESULT> = (event: {
168
168
  * - 'enum': The output is an enum.
169
169
  * - 'no-schema': The output is not a schema.
170
170
  *
171
+ * @param repairText - A function that attempts to repair the raw output of the model
172
+ * to enable JSON parsing.
173
+ * @param experimental_repairText - Deprecated alias for `repairText`.
174
+ *
171
175
  * @param telemetry - Optional telemetry configuration.
172
176
  *
173
177
  * @param providerOptions - Additional provider-specific options. They are passed through
@@ -231,6 +235,14 @@ export function streamObject<
231
235
  * A function that attempts to repair the raw output of the model
232
236
  * to enable JSON parsing.
233
237
  */
238
+ repairText?: RepairTextFunction;
239
+
240
+ /**
241
+ * A function that attempts to repair the raw output of the model
242
+ * to enable JSON parsing.
243
+ *
244
+ * @deprecated Use `repairText` instead.
245
+ */
234
246
  experimental_repairText?: RepairTextFunction;
235
247
 
236
248
  /**
@@ -346,7 +358,8 @@ export function streamObject<
346
358
  maxRetries,
347
359
  abortSignal,
348
360
  headers,
349
- experimental_repairText: repairText,
361
+ experimental_repairText,
362
+ repairText = experimental_repairText,
350
363
  experimental_telemetry,
351
364
  telemetry = experimental_telemetry,
352
365
  experimental_download: download,