@ai-sdk/xai 2.0.0-alpha.8 → 2.0.0-alpha.9
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 +14 -0
- package/dist/index.d.mts +30 -8
- package/dist/index.d.ts +30 -8
- package/dist/index.js +661 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +667 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/xai
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.9
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b94b4ed: add live search
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 107cd62: Add native XAI chat language model implementation
|
|
12
|
+
- Updated dependencies [811dff3]
|
|
13
|
+
- @ai-sdk/provider@2.0.0-alpha.9
|
|
14
|
+
- @ai-sdk/openai-compatible@1.0.0-alpha.9
|
|
15
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.9
|
|
16
|
+
|
|
3
17
|
## 2.0.0-alpha.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -51,16 +51,38 @@ interface XaiProviderSettings {
|
|
|
51
51
|
declare function createXai(options?: XaiProviderSettings): XaiProvider;
|
|
52
52
|
declare const xai: XaiProvider;
|
|
53
53
|
|
|
54
|
-
declare const
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
declare const xaiErrorDataSchema: z.ZodObject<{
|
|
55
|
+
error: z.ZodObject<{
|
|
56
|
+
message: z.ZodString;
|
|
57
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
59
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
message: string;
|
|
62
|
+
type?: string | null | undefined;
|
|
63
|
+
code?: string | number | null | undefined;
|
|
64
|
+
param?: any;
|
|
65
|
+
}, {
|
|
66
|
+
message: string;
|
|
67
|
+
type?: string | null | undefined;
|
|
68
|
+
code?: string | number | null | undefined;
|
|
69
|
+
param?: any;
|
|
70
|
+
}>;
|
|
57
71
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
error: {
|
|
73
|
+
message: string;
|
|
74
|
+
type?: string | null | undefined;
|
|
75
|
+
code?: string | number | null | undefined;
|
|
76
|
+
param?: any;
|
|
77
|
+
};
|
|
60
78
|
}, {
|
|
61
|
-
|
|
62
|
-
|
|
79
|
+
error: {
|
|
80
|
+
message: string;
|
|
81
|
+
type?: string | null | undefined;
|
|
82
|
+
code?: string | number | null | undefined;
|
|
83
|
+
param?: any;
|
|
84
|
+
};
|
|
63
85
|
}>;
|
|
64
|
-
type XaiErrorData = z.infer<typeof
|
|
86
|
+
type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
|
|
65
87
|
|
|
66
88
|
export { type XaiErrorData, type XaiProvider, type XaiProviderSettings, createXai, xai };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,16 +51,38 @@ interface XaiProviderSettings {
|
|
|
51
51
|
declare function createXai(options?: XaiProviderSettings): XaiProvider;
|
|
52
52
|
declare const xai: XaiProvider;
|
|
53
53
|
|
|
54
|
-
declare const
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
declare const xaiErrorDataSchema: z.ZodObject<{
|
|
55
|
+
error: z.ZodObject<{
|
|
56
|
+
message: z.ZodString;
|
|
57
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
59
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
message: string;
|
|
62
|
+
type?: string | null | undefined;
|
|
63
|
+
code?: string | number | null | undefined;
|
|
64
|
+
param?: any;
|
|
65
|
+
}, {
|
|
66
|
+
message: string;
|
|
67
|
+
type?: string | null | undefined;
|
|
68
|
+
code?: string | number | null | undefined;
|
|
69
|
+
param?: any;
|
|
70
|
+
}>;
|
|
57
71
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
error: {
|
|
73
|
+
message: string;
|
|
74
|
+
type?: string | null | undefined;
|
|
75
|
+
code?: string | number | null | undefined;
|
|
76
|
+
param?: any;
|
|
77
|
+
};
|
|
60
78
|
}, {
|
|
61
|
-
|
|
62
|
-
|
|
79
|
+
error: {
|
|
80
|
+
message: string;
|
|
81
|
+
type?: string | null | undefined;
|
|
82
|
+
code?: string | number | null | undefined;
|
|
83
|
+
param?: any;
|
|
84
|
+
};
|
|
63
85
|
}>;
|
|
64
|
-
type XaiErrorData = z.infer<typeof
|
|
86
|
+
type XaiErrorData = z.infer<typeof xaiErrorDataSchema>;
|
|
65
87
|
|
|
66
88
|
export { type XaiErrorData, type XaiProvider, type XaiProviderSettings, createXai, xai };
|