@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/xai
|
|
2
2
|
|
|
3
|
+
## 2.0.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3c6f4e1: fix(provider/xai): correct sources format in searchParameters
|
|
8
|
+
|
|
9
|
+
## 2.0.41
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f4a85f7: fix(xai): use correct parameter names for maxOutputTokens
|
|
14
|
+
|
|
3
15
|
## 2.0.40
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -251,8 +251,11 @@ var xaiProviderOptions = import_v4.z.object({
|
|
|
251
251
|
*/
|
|
252
252
|
maxSearchResults: import_v4.z.number().min(1).max(50).optional(),
|
|
253
253
|
/**
|
|
254
|
-
* data sources to search from
|
|
255
|
-
* defaults to [
|
|
254
|
+
* data sources to search from.
|
|
255
|
+
* defaults to [{ type: 'web' }, { type: 'x' }] if not specified.
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* sources: [{ type: 'web', country: 'US' }, { type: 'x' }]
|
|
256
259
|
*/
|
|
257
260
|
sources: import_v4.z.array(searchSourceSchema).optional()
|
|
258
261
|
}).optional()
|
|
@@ -402,7 +405,7 @@ var XaiChatLanguageModel = class {
|
|
|
402
405
|
// model id
|
|
403
406
|
model: this.modelId,
|
|
404
407
|
// standard generation settings
|
|
405
|
-
|
|
408
|
+
max_completion_tokens: maxOutputTokens,
|
|
406
409
|
temperature,
|
|
407
410
|
top_p: topP,
|
|
408
411
|
seed,
|
|
@@ -1527,7 +1530,7 @@ var XaiResponsesLanguageModel = class {
|
|
|
1527
1530
|
const baseArgs = {
|
|
1528
1531
|
model: this.modelId,
|
|
1529
1532
|
input,
|
|
1530
|
-
|
|
1533
|
+
max_output_tokens: maxOutputTokens,
|
|
1531
1534
|
temperature,
|
|
1532
1535
|
top_p: topP,
|
|
1533
1536
|
seed,
|
|
@@ -1992,7 +1995,7 @@ var xaiTools = {
|
|
|
1992
1995
|
};
|
|
1993
1996
|
|
|
1994
1997
|
// src/version.ts
|
|
1995
|
-
var VERSION = true ? "2.0.
|
|
1998
|
+
var VERSION = true ? "2.0.42" : "0.0.0-test";
|
|
1996
1999
|
|
|
1997
2000
|
// src/xai-provider.ts
|
|
1998
2001
|
var xaiErrorStructure = {
|