@ai-sdk/xai 2.0.40 → 2.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/CHANGELOG.md +12 -0
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -234,8 +234,11 @@ var xaiProviderOptions = z.object({
|
|
|
234
234
|
*/
|
|
235
235
|
maxSearchResults: z.number().min(1).max(50).optional(),
|
|
236
236
|
/**
|
|
237
|
-
* data sources to search from
|
|
238
|
-
* defaults to [
|
|
237
|
+
* data sources to search from.
|
|
238
|
+
* defaults to [{ type: 'web' }, { type: 'x' }] if not specified.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* sources: [{ type: 'web', country: 'US' }, { type: 'x' }]
|
|
239
242
|
*/
|
|
240
243
|
sources: z.array(searchSourceSchema).optional()
|
|
241
244
|
}).optional()
|
|
@@ -387,7 +390,7 @@ var XaiChatLanguageModel = class {
|
|
|
387
390
|
// model id
|
|
388
391
|
model: this.modelId,
|
|
389
392
|
// standard generation settings
|
|
390
|
-
|
|
393
|
+
max_completion_tokens: maxOutputTokens,
|
|
391
394
|
temperature,
|
|
392
395
|
top_p: topP,
|
|
393
396
|
seed,
|
|
@@ -1528,7 +1531,7 @@ var XaiResponsesLanguageModel = class {
|
|
|
1528
1531
|
const baseArgs = {
|
|
1529
1532
|
model: this.modelId,
|
|
1530
1533
|
input,
|
|
1531
|
-
|
|
1534
|
+
max_output_tokens: maxOutputTokens,
|
|
1532
1535
|
temperature,
|
|
1533
1536
|
top_p: topP,
|
|
1534
1537
|
seed,
|
|
@@ -1993,7 +1996,7 @@ var xaiTools = {
|
|
|
1993
1996
|
};
|
|
1994
1997
|
|
|
1995
1998
|
// src/version.ts
|
|
1996
|
-
var VERSION = true ? "2.0.
|
|
1999
|
+
var VERSION = true ? "2.0.42" : "0.0.0-test";
|
|
1997
2000
|
|
|
1998
2001
|
// src/xai-provider.ts
|
|
1999
2002
|
var xaiErrorStructure = {
|