@nocobase/plugin-ai 2.1.0-beta.25 → 2.1.0-beta.26

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.
Files changed (72) hide show
  1. package/dist/client/{559.c119db3f985a695f.js → 559.39872901b9053629.js} +1 -1
  2. package/dist/client/index.js +3 -3
  3. package/dist/client/llm-providers/xai/ModelSettings.d.ts +10 -0
  4. package/dist/client/llm-providers/xai/index.d.ts +10 -0
  5. package/dist/externalVersion.js +15 -15
  6. package/dist/node_modules/@langchain/xai/LICENSE +21 -0
  7. package/dist/node_modules/@langchain/xai/dist/_virtual/rolldown_runtime.cjs +25 -0
  8. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.cjs +568 -0
  9. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.cts +619 -0
  10. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.ts +619 -0
  11. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.js +566 -0
  12. package/dist/node_modules/@langchain/xai/dist/chat_models/index.cjs +2 -0
  13. package/dist/node_modules/@langchain/xai/dist/chat_models/index.d.ts +3 -0
  14. package/dist/node_modules/@langchain/xai/dist/chat_models/index.js +2 -0
  15. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.cts +1178 -0
  16. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.ts +1178 -0
  17. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.cjs +233 -0
  18. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.cts +70 -0
  19. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.ts +70 -0
  20. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.js +232 -0
  21. package/dist/node_modules/@langchain/xai/dist/converters/responses.cjs +168 -0
  22. package/dist/node_modules/@langchain/xai/dist/converters/responses.js +164 -0
  23. package/dist/node_modules/@langchain/xai/dist/index.cjs +7 -0
  24. package/dist/node_modules/@langchain/xai/dist/index.d.cts +5 -0
  25. package/dist/node_modules/@langchain/xai/dist/index.d.ts +6 -0
  26. package/dist/node_modules/@langchain/xai/dist/index.js +6 -0
  27. package/dist/node_modules/@langchain/xai/dist/live_search.cjs +54 -0
  28. package/dist/node_modules/@langchain/xai/dist/live_search.d.cts +145 -0
  29. package/dist/node_modules/@langchain/xai/dist/live_search.d.ts +145 -0
  30. package/dist/node_modules/@langchain/xai/dist/live_search.js +51 -0
  31. package/dist/node_modules/@langchain/xai/dist/profiles.cjs +289 -0
  32. package/dist/node_modules/@langchain/xai/dist/profiles.js +288 -0
  33. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.cjs +52 -0
  34. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.d.cts +64 -0
  35. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.d.ts +64 -0
  36. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.js +50 -0
  37. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.cjs +60 -0
  38. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.d.cts +90 -0
  39. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.d.ts +90 -0
  40. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.js +58 -0
  41. package/dist/node_modules/@langchain/xai/dist/tools/index.cjs +18 -0
  42. package/dist/node_modules/@langchain/xai/dist/tools/index.d.cts +18 -0
  43. package/dist/node_modules/@langchain/xai/dist/tools/index.d.ts +18 -0
  44. package/dist/node_modules/@langchain/xai/dist/tools/index.js +18 -0
  45. package/dist/node_modules/@langchain/xai/dist/tools/live_search.cjs +94 -0
  46. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.cts +149 -0
  47. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.ts +149 -0
  48. package/dist/node_modules/@langchain/xai/dist/tools/live_search.js +91 -0
  49. package/dist/node_modules/@langchain/xai/dist/tools/web_search.cjs +57 -0
  50. package/dist/node_modules/@langchain/xai/dist/tools/web_search.d.cts +104 -0
  51. package/dist/node_modules/@langchain/xai/dist/tools/web_search.d.ts +104 -0
  52. package/dist/node_modules/@langchain/xai/dist/tools/web_search.js +55 -0
  53. package/dist/node_modules/@langchain/xai/dist/tools/x_search.cjs +63 -0
  54. package/dist/node_modules/@langchain/xai/dist/tools/x_search.d.cts +145 -0
  55. package/dist/node_modules/@langchain/xai/dist/tools/x_search.d.ts +145 -0
  56. package/dist/node_modules/@langchain/xai/dist/tools/x_search.js +61 -0
  57. package/dist/node_modules/@langchain/xai/package.json +1 -0
  58. package/dist/node_modules/fast-glob/package.json +1 -1
  59. package/dist/node_modules/flexsearch/package.json +1 -1
  60. package/dist/node_modules/fs-extra/package.json +1 -1
  61. package/dist/node_modules/jsonrepair/package.json +1 -1
  62. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  63. package/dist/node_modules/openai/package.json +1 -1
  64. package/dist/node_modules/zod/package.json +1 -1
  65. package/dist/server/ai-employees/ai-employee.js +11 -7
  66. package/dist/server/llm-providers/xai.d.ts +17 -0
  67. package/dist/server/llm-providers/xai.js +88 -0
  68. package/dist/server/plugin.js +3 -0
  69. package/dist/server/workflow/nodes/employee/files.js +7 -4
  70. package/dist/server/workflow/nodes/employee/index.js +4 -3
  71. package/dist/server/workflow/nodes/employee/types.d.ts +1 -1
  72. package/package.json +3 -2
@@ -0,0 +1,289 @@
1
+
2
+ //#region src/profiles.ts
3
+ const PROFILES = {
4
+ "grok-4-fast-non-reasoning": {
5
+ maxInputTokens: 2e6,
6
+ imageInputs: true,
7
+ audioInputs: false,
8
+ pdfInputs: false,
9
+ videoInputs: false,
10
+ maxOutputTokens: 3e4,
11
+ reasoningOutput: false,
12
+ imageOutputs: false,
13
+ audioOutputs: false,
14
+ videoOutputs: false,
15
+ toolCalling: true,
16
+ structuredOutput: false
17
+ },
18
+ "grok-3-fast": {
19
+ maxInputTokens: 131072,
20
+ imageInputs: false,
21
+ audioInputs: false,
22
+ pdfInputs: false,
23
+ videoInputs: false,
24
+ maxOutputTokens: 8192,
25
+ reasoningOutput: false,
26
+ imageOutputs: false,
27
+ audioOutputs: false,
28
+ videoOutputs: false,
29
+ toolCalling: true,
30
+ structuredOutput: false
31
+ },
32
+ "grok-4": {
33
+ maxInputTokens: 256e3,
34
+ imageInputs: false,
35
+ audioInputs: false,
36
+ pdfInputs: false,
37
+ videoInputs: false,
38
+ maxOutputTokens: 64e3,
39
+ reasoningOutput: true,
40
+ imageOutputs: false,
41
+ audioOutputs: false,
42
+ videoOutputs: false,
43
+ toolCalling: true,
44
+ structuredOutput: false
45
+ },
46
+ "grok-2-vision": {
47
+ maxInputTokens: 8192,
48
+ imageInputs: true,
49
+ audioInputs: false,
50
+ pdfInputs: false,
51
+ videoInputs: false,
52
+ maxOutputTokens: 4096,
53
+ reasoningOutput: false,
54
+ imageOutputs: false,
55
+ audioOutputs: false,
56
+ videoOutputs: false,
57
+ toolCalling: true,
58
+ structuredOutput: false
59
+ },
60
+ "grok-code-fast-1": {
61
+ maxInputTokens: 256e3,
62
+ imageInputs: false,
63
+ audioInputs: false,
64
+ pdfInputs: false,
65
+ videoInputs: false,
66
+ maxOutputTokens: 1e4,
67
+ reasoningOutput: true,
68
+ imageOutputs: false,
69
+ audioOutputs: false,
70
+ videoOutputs: false,
71
+ toolCalling: true,
72
+ structuredOutput: false
73
+ },
74
+ "grok-2": {
75
+ maxInputTokens: 131072,
76
+ imageInputs: false,
77
+ audioInputs: false,
78
+ pdfInputs: false,
79
+ videoInputs: false,
80
+ maxOutputTokens: 8192,
81
+ reasoningOutput: false,
82
+ imageOutputs: false,
83
+ audioOutputs: false,
84
+ videoOutputs: false,
85
+ toolCalling: true,
86
+ structuredOutput: false
87
+ },
88
+ "grok-3-mini-fast-latest": {
89
+ maxInputTokens: 131072,
90
+ imageInputs: false,
91
+ audioInputs: false,
92
+ pdfInputs: false,
93
+ videoInputs: false,
94
+ maxOutputTokens: 8192,
95
+ reasoningOutput: true,
96
+ imageOutputs: false,
97
+ audioOutputs: false,
98
+ videoOutputs: false,
99
+ toolCalling: true,
100
+ structuredOutput: false
101
+ },
102
+ "grok-2-vision-1212": {
103
+ maxInputTokens: 8192,
104
+ imageInputs: true,
105
+ audioInputs: false,
106
+ pdfInputs: false,
107
+ videoInputs: false,
108
+ maxOutputTokens: 4096,
109
+ reasoningOutput: false,
110
+ imageOutputs: false,
111
+ audioOutputs: false,
112
+ videoOutputs: false,
113
+ toolCalling: true,
114
+ structuredOutput: false
115
+ },
116
+ "grok-3": {
117
+ maxInputTokens: 131072,
118
+ imageInputs: false,
119
+ audioInputs: false,
120
+ pdfInputs: false,
121
+ videoInputs: false,
122
+ maxOutputTokens: 8192,
123
+ reasoningOutput: false,
124
+ imageOutputs: false,
125
+ audioOutputs: false,
126
+ videoOutputs: false,
127
+ toolCalling: true,
128
+ structuredOutput: false
129
+ },
130
+ "grok-4-fast": {
131
+ maxInputTokens: 2e6,
132
+ imageInputs: true,
133
+ audioInputs: false,
134
+ pdfInputs: false,
135
+ videoInputs: false,
136
+ maxOutputTokens: 3e4,
137
+ reasoningOutput: true,
138
+ imageOutputs: false,
139
+ audioOutputs: false,
140
+ videoOutputs: false,
141
+ toolCalling: true,
142
+ structuredOutput: false
143
+ },
144
+ "grok-2-latest": {
145
+ maxInputTokens: 131072,
146
+ imageInputs: false,
147
+ audioInputs: false,
148
+ pdfInputs: false,
149
+ videoInputs: false,
150
+ maxOutputTokens: 8192,
151
+ reasoningOutput: false,
152
+ imageOutputs: false,
153
+ audioOutputs: false,
154
+ videoOutputs: false,
155
+ toolCalling: true,
156
+ structuredOutput: false
157
+ },
158
+ "grok-2-1212": {
159
+ maxInputTokens: 131072,
160
+ imageInputs: false,
161
+ audioInputs: false,
162
+ pdfInputs: false,
163
+ videoInputs: false,
164
+ maxOutputTokens: 8192,
165
+ reasoningOutput: false,
166
+ imageOutputs: false,
167
+ audioOutputs: false,
168
+ videoOutputs: false,
169
+ toolCalling: true,
170
+ structuredOutput: false
171
+ },
172
+ "grok-3-fast-latest": {
173
+ maxInputTokens: 131072,
174
+ imageInputs: false,
175
+ audioInputs: false,
176
+ pdfInputs: false,
177
+ videoInputs: false,
178
+ maxOutputTokens: 8192,
179
+ reasoningOutput: false,
180
+ imageOutputs: false,
181
+ audioOutputs: false,
182
+ videoOutputs: false,
183
+ toolCalling: true,
184
+ structuredOutput: false
185
+ },
186
+ "grok-3-latest": {
187
+ maxInputTokens: 131072,
188
+ imageInputs: false,
189
+ audioInputs: false,
190
+ pdfInputs: false,
191
+ videoInputs: false,
192
+ maxOutputTokens: 8192,
193
+ reasoningOutput: false,
194
+ imageOutputs: false,
195
+ audioOutputs: false,
196
+ videoOutputs: false,
197
+ toolCalling: true,
198
+ structuredOutput: false
199
+ },
200
+ "grok-2-vision-latest": {
201
+ maxInputTokens: 8192,
202
+ imageInputs: true,
203
+ audioInputs: false,
204
+ pdfInputs: false,
205
+ videoInputs: false,
206
+ maxOutputTokens: 4096,
207
+ reasoningOutput: false,
208
+ imageOutputs: false,
209
+ audioOutputs: false,
210
+ videoOutputs: false,
211
+ toolCalling: true,
212
+ structuredOutput: false
213
+ },
214
+ "grok-vision-beta": {
215
+ maxInputTokens: 8192,
216
+ imageInputs: true,
217
+ audioInputs: false,
218
+ pdfInputs: false,
219
+ videoInputs: false,
220
+ maxOutputTokens: 4096,
221
+ reasoningOutput: false,
222
+ imageOutputs: false,
223
+ audioOutputs: false,
224
+ videoOutputs: false,
225
+ toolCalling: true,
226
+ structuredOutput: false
227
+ },
228
+ "grok-3-mini": {
229
+ maxInputTokens: 131072,
230
+ imageInputs: false,
231
+ audioInputs: false,
232
+ pdfInputs: false,
233
+ videoInputs: false,
234
+ maxOutputTokens: 8192,
235
+ reasoningOutput: true,
236
+ imageOutputs: false,
237
+ audioOutputs: false,
238
+ videoOutputs: false,
239
+ toolCalling: true,
240
+ structuredOutput: false
241
+ },
242
+ "grok-beta": {
243
+ maxInputTokens: 131072,
244
+ imageInputs: false,
245
+ audioInputs: false,
246
+ pdfInputs: false,
247
+ videoInputs: false,
248
+ maxOutputTokens: 4096,
249
+ reasoningOutput: false,
250
+ imageOutputs: false,
251
+ audioOutputs: false,
252
+ videoOutputs: false,
253
+ toolCalling: true,
254
+ structuredOutput: false
255
+ },
256
+ "grok-3-mini-latest": {
257
+ maxInputTokens: 131072,
258
+ imageInputs: false,
259
+ audioInputs: false,
260
+ pdfInputs: false,
261
+ videoInputs: false,
262
+ maxOutputTokens: 8192,
263
+ reasoningOutput: true,
264
+ imageOutputs: false,
265
+ audioOutputs: false,
266
+ videoOutputs: false,
267
+ toolCalling: true,
268
+ structuredOutput: false
269
+ },
270
+ "grok-3-mini-fast": {
271
+ maxInputTokens: 131072,
272
+ imageInputs: false,
273
+ audioInputs: false,
274
+ pdfInputs: false,
275
+ videoInputs: false,
276
+ maxOutputTokens: 8192,
277
+ reasoningOutput: true,
278
+ imageOutputs: false,
279
+ audioOutputs: false,
280
+ videoOutputs: false,
281
+ toolCalling: true,
282
+ structuredOutput: false
283
+ }
284
+ };
285
+ var profiles_default = PROFILES;
286
+
287
+ //#endregion
288
+ exports.default = profiles_default;
289
+ //# sourceMappingURL=profiles.cjs.map
@@ -0,0 +1,288 @@
1
+ //#region src/profiles.ts
2
+ const PROFILES = {
3
+ "grok-4-fast-non-reasoning": {
4
+ maxInputTokens: 2e6,
5
+ imageInputs: true,
6
+ audioInputs: false,
7
+ pdfInputs: false,
8
+ videoInputs: false,
9
+ maxOutputTokens: 3e4,
10
+ reasoningOutput: false,
11
+ imageOutputs: false,
12
+ audioOutputs: false,
13
+ videoOutputs: false,
14
+ toolCalling: true,
15
+ structuredOutput: false
16
+ },
17
+ "grok-3-fast": {
18
+ maxInputTokens: 131072,
19
+ imageInputs: false,
20
+ audioInputs: false,
21
+ pdfInputs: false,
22
+ videoInputs: false,
23
+ maxOutputTokens: 8192,
24
+ reasoningOutput: false,
25
+ imageOutputs: false,
26
+ audioOutputs: false,
27
+ videoOutputs: false,
28
+ toolCalling: true,
29
+ structuredOutput: false
30
+ },
31
+ "grok-4": {
32
+ maxInputTokens: 256e3,
33
+ imageInputs: false,
34
+ audioInputs: false,
35
+ pdfInputs: false,
36
+ videoInputs: false,
37
+ maxOutputTokens: 64e3,
38
+ reasoningOutput: true,
39
+ imageOutputs: false,
40
+ audioOutputs: false,
41
+ videoOutputs: false,
42
+ toolCalling: true,
43
+ structuredOutput: false
44
+ },
45
+ "grok-2-vision": {
46
+ maxInputTokens: 8192,
47
+ imageInputs: true,
48
+ audioInputs: false,
49
+ pdfInputs: false,
50
+ videoInputs: false,
51
+ maxOutputTokens: 4096,
52
+ reasoningOutput: false,
53
+ imageOutputs: false,
54
+ audioOutputs: false,
55
+ videoOutputs: false,
56
+ toolCalling: true,
57
+ structuredOutput: false
58
+ },
59
+ "grok-code-fast-1": {
60
+ maxInputTokens: 256e3,
61
+ imageInputs: false,
62
+ audioInputs: false,
63
+ pdfInputs: false,
64
+ videoInputs: false,
65
+ maxOutputTokens: 1e4,
66
+ reasoningOutput: true,
67
+ imageOutputs: false,
68
+ audioOutputs: false,
69
+ videoOutputs: false,
70
+ toolCalling: true,
71
+ structuredOutput: false
72
+ },
73
+ "grok-2": {
74
+ maxInputTokens: 131072,
75
+ imageInputs: false,
76
+ audioInputs: false,
77
+ pdfInputs: false,
78
+ videoInputs: false,
79
+ maxOutputTokens: 8192,
80
+ reasoningOutput: false,
81
+ imageOutputs: false,
82
+ audioOutputs: false,
83
+ videoOutputs: false,
84
+ toolCalling: true,
85
+ structuredOutput: false
86
+ },
87
+ "grok-3-mini-fast-latest": {
88
+ maxInputTokens: 131072,
89
+ imageInputs: false,
90
+ audioInputs: false,
91
+ pdfInputs: false,
92
+ videoInputs: false,
93
+ maxOutputTokens: 8192,
94
+ reasoningOutput: true,
95
+ imageOutputs: false,
96
+ audioOutputs: false,
97
+ videoOutputs: false,
98
+ toolCalling: true,
99
+ structuredOutput: false
100
+ },
101
+ "grok-2-vision-1212": {
102
+ maxInputTokens: 8192,
103
+ imageInputs: true,
104
+ audioInputs: false,
105
+ pdfInputs: false,
106
+ videoInputs: false,
107
+ maxOutputTokens: 4096,
108
+ reasoningOutput: false,
109
+ imageOutputs: false,
110
+ audioOutputs: false,
111
+ videoOutputs: false,
112
+ toolCalling: true,
113
+ structuredOutput: false
114
+ },
115
+ "grok-3": {
116
+ maxInputTokens: 131072,
117
+ imageInputs: false,
118
+ audioInputs: false,
119
+ pdfInputs: false,
120
+ videoInputs: false,
121
+ maxOutputTokens: 8192,
122
+ reasoningOutput: false,
123
+ imageOutputs: false,
124
+ audioOutputs: false,
125
+ videoOutputs: false,
126
+ toolCalling: true,
127
+ structuredOutput: false
128
+ },
129
+ "grok-4-fast": {
130
+ maxInputTokens: 2e6,
131
+ imageInputs: true,
132
+ audioInputs: false,
133
+ pdfInputs: false,
134
+ videoInputs: false,
135
+ maxOutputTokens: 3e4,
136
+ reasoningOutput: true,
137
+ imageOutputs: false,
138
+ audioOutputs: false,
139
+ videoOutputs: false,
140
+ toolCalling: true,
141
+ structuredOutput: false
142
+ },
143
+ "grok-2-latest": {
144
+ maxInputTokens: 131072,
145
+ imageInputs: false,
146
+ audioInputs: false,
147
+ pdfInputs: false,
148
+ videoInputs: false,
149
+ maxOutputTokens: 8192,
150
+ reasoningOutput: false,
151
+ imageOutputs: false,
152
+ audioOutputs: false,
153
+ videoOutputs: false,
154
+ toolCalling: true,
155
+ structuredOutput: false
156
+ },
157
+ "grok-2-1212": {
158
+ maxInputTokens: 131072,
159
+ imageInputs: false,
160
+ audioInputs: false,
161
+ pdfInputs: false,
162
+ videoInputs: false,
163
+ maxOutputTokens: 8192,
164
+ reasoningOutput: false,
165
+ imageOutputs: false,
166
+ audioOutputs: false,
167
+ videoOutputs: false,
168
+ toolCalling: true,
169
+ structuredOutput: false
170
+ },
171
+ "grok-3-fast-latest": {
172
+ maxInputTokens: 131072,
173
+ imageInputs: false,
174
+ audioInputs: false,
175
+ pdfInputs: false,
176
+ videoInputs: false,
177
+ maxOutputTokens: 8192,
178
+ reasoningOutput: false,
179
+ imageOutputs: false,
180
+ audioOutputs: false,
181
+ videoOutputs: false,
182
+ toolCalling: true,
183
+ structuredOutput: false
184
+ },
185
+ "grok-3-latest": {
186
+ maxInputTokens: 131072,
187
+ imageInputs: false,
188
+ audioInputs: false,
189
+ pdfInputs: false,
190
+ videoInputs: false,
191
+ maxOutputTokens: 8192,
192
+ reasoningOutput: false,
193
+ imageOutputs: false,
194
+ audioOutputs: false,
195
+ videoOutputs: false,
196
+ toolCalling: true,
197
+ structuredOutput: false
198
+ },
199
+ "grok-2-vision-latest": {
200
+ maxInputTokens: 8192,
201
+ imageInputs: true,
202
+ audioInputs: false,
203
+ pdfInputs: false,
204
+ videoInputs: false,
205
+ maxOutputTokens: 4096,
206
+ reasoningOutput: false,
207
+ imageOutputs: false,
208
+ audioOutputs: false,
209
+ videoOutputs: false,
210
+ toolCalling: true,
211
+ structuredOutput: false
212
+ },
213
+ "grok-vision-beta": {
214
+ maxInputTokens: 8192,
215
+ imageInputs: true,
216
+ audioInputs: false,
217
+ pdfInputs: false,
218
+ videoInputs: false,
219
+ maxOutputTokens: 4096,
220
+ reasoningOutput: false,
221
+ imageOutputs: false,
222
+ audioOutputs: false,
223
+ videoOutputs: false,
224
+ toolCalling: true,
225
+ structuredOutput: false
226
+ },
227
+ "grok-3-mini": {
228
+ maxInputTokens: 131072,
229
+ imageInputs: false,
230
+ audioInputs: false,
231
+ pdfInputs: false,
232
+ videoInputs: false,
233
+ maxOutputTokens: 8192,
234
+ reasoningOutput: true,
235
+ imageOutputs: false,
236
+ audioOutputs: false,
237
+ videoOutputs: false,
238
+ toolCalling: true,
239
+ structuredOutput: false
240
+ },
241
+ "grok-beta": {
242
+ maxInputTokens: 131072,
243
+ imageInputs: false,
244
+ audioInputs: false,
245
+ pdfInputs: false,
246
+ videoInputs: false,
247
+ maxOutputTokens: 4096,
248
+ reasoningOutput: false,
249
+ imageOutputs: false,
250
+ audioOutputs: false,
251
+ videoOutputs: false,
252
+ toolCalling: true,
253
+ structuredOutput: false
254
+ },
255
+ "grok-3-mini-latest": {
256
+ maxInputTokens: 131072,
257
+ imageInputs: false,
258
+ audioInputs: false,
259
+ pdfInputs: false,
260
+ videoInputs: false,
261
+ maxOutputTokens: 8192,
262
+ reasoningOutput: true,
263
+ imageOutputs: false,
264
+ audioOutputs: false,
265
+ videoOutputs: false,
266
+ toolCalling: true,
267
+ structuredOutput: false
268
+ },
269
+ "grok-3-mini-fast": {
270
+ maxInputTokens: 131072,
271
+ imageInputs: false,
272
+ audioInputs: false,
273
+ pdfInputs: false,
274
+ videoInputs: false,
275
+ maxOutputTokens: 8192,
276
+ reasoningOutput: true,
277
+ imageOutputs: false,
278
+ audioOutputs: false,
279
+ videoOutputs: false,
280
+ toolCalling: true,
281
+ structuredOutput: false
282
+ }
283
+ };
284
+ var profiles_default = PROFILES;
285
+
286
+ //#endregion
287
+ export { profiles_default as default };
288
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1,52 @@
1
+
2
+ //#region src/tools/code_execution.ts
3
+ /**
4
+ * xAI Code Execution tool type constant.
5
+ * Note: The Responses API uses "code_interpreter" as the type name.
6
+ */
7
+ const XAI_CODE_EXECUTION_TOOL_TYPE = "code_interpreter";
8
+ /**
9
+ * Creates an xAI code execution tool.
10
+ * Enables the model to write and execute Python code in real-time for
11
+ * calculations, data analysis, and complex computations.
12
+ *
13
+ * This tool is executed server-side by the xAI API in a secure, sandboxed
14
+ * Python environment with common libraries pre-installed (NumPy, Pandas,
15
+ * Matplotlib, SciPy).
16
+ *
17
+ * @returns An XAICodeExecutionTool object to pass to the model
18
+ *
19
+ * @example Basic usage
20
+ * ```typescript
21
+ * import { ChatXAIResponses, tools } from "@langchain/xai";
22
+ *
23
+ * const llm = new ChatXAIResponses({
24
+ * model: "grok-4-1-fast",
25
+ * });
26
+ *
27
+ * const codeExecution = tools.xaiCodeExecution();
28
+ * const result = await llm.invoke(
29
+ * "Calculate the compound interest for $10,000 at 5% annually for 10 years",
30
+ * { tools: [codeExecution] }
31
+ * );
32
+ * ```
33
+ *
34
+ * @example Combining with search tools
35
+ * ```typescript
36
+ * const webSearch = tools.xaiWebSearch();
37
+ * const codeExecution = tools.xaiCodeExecution();
38
+ *
39
+ * const result = await llm.invoke(
40
+ * "Find the current stock price of AAPL and calculate what it would be worth with 10% annual growth over 5 years",
41
+ * { tools: [webSearch, codeExecution] }
42
+ * );
43
+ * ```
44
+ */
45
+ function xaiCodeExecution() {
46
+ return { type: XAI_CODE_EXECUTION_TOOL_TYPE };
47
+ }
48
+
49
+ //#endregion
50
+ exports.XAI_CODE_EXECUTION_TOOL_TYPE = XAI_CODE_EXECUTION_TOOL_TYPE;
51
+ exports.xaiCodeExecution = xaiCodeExecution;
52
+ //# sourceMappingURL=code_execution.cjs.map
@@ -0,0 +1,64 @@
1
+ //#region src/tools/code_execution.d.ts
2
+ /**
3
+ * xAI Code Execution tool type constant.
4
+ * Note: The Responses API uses "code_interpreter" as the type name.
5
+ */
6
+ declare const XAI_CODE_EXECUTION_TOOL_TYPE = "code_interpreter";
7
+ /**
8
+ * xAI's built-in code execution tool interface.
9
+ * Enables the model to write and execute Python code in real-time.
10
+ *
11
+ * This tool is part of xAI's agentic tool calling API and allows for:
12
+ * - Mathematical computations
13
+ * - Data analysis
14
+ * - Financial modeling
15
+ * - Scientific computing
16
+ * - Code generation and testing
17
+ */
18
+ interface XAICodeExecutionTool {
19
+ /**
20
+ * The type of the tool. Must be "code_interpreter".
21
+ */
22
+ type: typeof XAI_CODE_EXECUTION_TOOL_TYPE;
23
+ }
24
+ /**
25
+ * Creates an xAI code execution tool.
26
+ * Enables the model to write and execute Python code in real-time for
27
+ * calculations, data analysis, and complex computations.
28
+ *
29
+ * This tool is executed server-side by the xAI API in a secure, sandboxed
30
+ * Python environment with common libraries pre-installed (NumPy, Pandas,
31
+ * Matplotlib, SciPy).
32
+ *
33
+ * @returns An XAICodeExecutionTool object to pass to the model
34
+ *
35
+ * @example Basic usage
36
+ * ```typescript
37
+ * import { ChatXAIResponses, tools } from "@langchain/xai";
38
+ *
39
+ * const llm = new ChatXAIResponses({
40
+ * model: "grok-4-1-fast",
41
+ * });
42
+ *
43
+ * const codeExecution = tools.xaiCodeExecution();
44
+ * const result = await llm.invoke(
45
+ * "Calculate the compound interest for $10,000 at 5% annually for 10 years",
46
+ * { tools: [codeExecution] }
47
+ * );
48
+ * ```
49
+ *
50
+ * @example Combining with search tools
51
+ * ```typescript
52
+ * const webSearch = tools.xaiWebSearch();
53
+ * const codeExecution = tools.xaiCodeExecution();
54
+ *
55
+ * const result = await llm.invoke(
56
+ * "Find the current stock price of AAPL and calculate what it would be worth with 10% annual growth over 5 years",
57
+ * { tools: [webSearch, codeExecution] }
58
+ * );
59
+ * ```
60
+ */
61
+ declare function xaiCodeExecution(): XAICodeExecutionTool;
62
+ //#endregion
63
+ export { XAICodeExecutionTool, XAI_CODE_EXECUTION_TOOL_TYPE, xaiCodeExecution };
64
+ //# sourceMappingURL=code_execution.d.cts.map