@mastra/openai 1.0.1-alpha.2 → 1.0.1-alpha.21

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.
@@ -0,0 +1,397 @@
1
+ import { OpenAPIToolset, ToolAction } from '@mastra/core';
2
+ import * as integrationClient from './client/services.gen';
3
+ import * as zodSchema from './client/zodSchema';
4
+ import { OpenaiConfig } from './types';
5
+ export declare class OpenaiToolset extends OpenAPIToolset {
6
+ readonly name = "OPENAI";
7
+ readonly logoUrl: any;
8
+ config: OpenaiConfig;
9
+ readonly tools: Record<Exclude<keyof typeof integrationClient, 'client'>, ToolAction<any, any, any, any>>;
10
+ categories: string[];
11
+ description: string;
12
+ constructor({ config }: {
13
+ config: OpenaiConfig;
14
+ });
15
+ protected get toolSchemas(): typeof zodSchema;
16
+ protected get toolDocumentations(): {
17
+ createChatCompletion: {
18
+ comment: string;
19
+ doc: string;
20
+ };
21
+ createCompletion: {
22
+ comment: string;
23
+ doc: string;
24
+ };
25
+ createImage: {
26
+ comment: string;
27
+ doc: string;
28
+ };
29
+ createImageEdit: {
30
+ comment: string;
31
+ doc: string;
32
+ };
33
+ createImageVariation: {
34
+ comment: string;
35
+ doc: string;
36
+ };
37
+ createEmbedding: {
38
+ comment: string;
39
+ doc: string;
40
+ };
41
+ createSpeech: {
42
+ comment: string;
43
+ doc: string;
44
+ };
45
+ createTranscription: {
46
+ comment: string;
47
+ doc: string;
48
+ };
49
+ createTranslation: {
50
+ comment: string;
51
+ doc: string;
52
+ };
53
+ listFiles: {
54
+ comment: string;
55
+ doc: string;
56
+ };
57
+ createFile: {
58
+ comment: string;
59
+ doc: string;
60
+ };
61
+ deleteFile: {
62
+ comment: string;
63
+ doc: string;
64
+ };
65
+ retrieveFile: {
66
+ comment: string;
67
+ doc: string;
68
+ };
69
+ downloadFile: {
70
+ comment: string;
71
+ doc: string;
72
+ };
73
+ createUpload: {
74
+ comment: string;
75
+ doc: string;
76
+ };
77
+ addUploadPart: {
78
+ comment: string;
79
+ doc: string;
80
+ };
81
+ completeUpload: {
82
+ comment: string;
83
+ doc: string;
84
+ };
85
+ cancelUpload: {
86
+ comment: string;
87
+ doc: string;
88
+ };
89
+ createFineTuningJob: {
90
+ comment: string;
91
+ doc: string;
92
+ };
93
+ listPaginatedFineTuningJobs: {
94
+ comment: string;
95
+ doc: string;
96
+ };
97
+ retrieveFineTuningJob: {
98
+ comment: string;
99
+ doc: string;
100
+ };
101
+ listFineTuningEvents: {
102
+ comment: string;
103
+ doc: string;
104
+ };
105
+ cancelFineTuningJob: {
106
+ comment: string;
107
+ doc: string;
108
+ };
109
+ listFineTuningJobCheckpoints: {
110
+ comment: string;
111
+ doc: string;
112
+ };
113
+ listModels: {
114
+ comment: string;
115
+ doc: string;
116
+ };
117
+ retrieveModel: {
118
+ comment: string;
119
+ doc: string;
120
+ };
121
+ deleteModel: {
122
+ comment: string;
123
+ doc: string;
124
+ };
125
+ createModeration: {
126
+ comment: string;
127
+ doc: string;
128
+ };
129
+ listAssistants: {
130
+ comment: string;
131
+ doc: string;
132
+ };
133
+ createAssistant: {
134
+ comment: string;
135
+ doc: string;
136
+ };
137
+ getAssistant: {
138
+ comment: string;
139
+ doc: string;
140
+ };
141
+ modifyAssistant: {
142
+ comment: string;
143
+ doc: string;
144
+ };
145
+ deleteAssistant: {
146
+ comment: string;
147
+ doc: string;
148
+ };
149
+ createThread: {
150
+ comment: string;
151
+ doc: string;
152
+ };
153
+ getThread: {
154
+ comment: string;
155
+ doc: string;
156
+ };
157
+ modifyThread: {
158
+ comment: string;
159
+ doc: string;
160
+ };
161
+ deleteThread: {
162
+ comment: string;
163
+ doc: string;
164
+ };
165
+ listMessages: {
166
+ comment: string;
167
+ doc: string;
168
+ };
169
+ createMessage: {
170
+ comment: string;
171
+ doc: string;
172
+ };
173
+ getMessage: {
174
+ comment: string;
175
+ doc: string;
176
+ };
177
+ modifyMessage: {
178
+ comment: string;
179
+ doc: string;
180
+ };
181
+ deleteMessage: {
182
+ comment: string;
183
+ doc: string;
184
+ };
185
+ createThreadAndRun: {
186
+ comment: string;
187
+ doc: string;
188
+ };
189
+ listRuns: {
190
+ comment: string;
191
+ doc: string;
192
+ };
193
+ createRun: {
194
+ comment: string;
195
+ doc: string;
196
+ };
197
+ getRun: {
198
+ comment: string;
199
+ doc: string;
200
+ };
201
+ modifyRun: {
202
+ comment: string;
203
+ doc: string;
204
+ };
205
+ submitToolOuputsToRun: {
206
+ comment: string;
207
+ doc: string;
208
+ };
209
+ cancelRun: {
210
+ comment: string;
211
+ doc: string;
212
+ };
213
+ listRunSteps: {
214
+ comment: string;
215
+ doc: string;
216
+ };
217
+ getRunStep: {
218
+ comment: string;
219
+ doc: string;
220
+ };
221
+ listVectorStores: {
222
+ comment: string;
223
+ doc: string;
224
+ };
225
+ createVectorStore: {
226
+ comment: string;
227
+ doc: string;
228
+ };
229
+ getVectorStore: {
230
+ comment: string;
231
+ doc: string;
232
+ };
233
+ modifyVectorStore: {
234
+ comment: string;
235
+ doc: string;
236
+ };
237
+ deleteVectorStore: {
238
+ comment: string;
239
+ doc: string;
240
+ };
241
+ listVectorStoreFiles: {
242
+ comment: string;
243
+ doc: string;
244
+ };
245
+ createVectorStoreFile: {
246
+ comment: string;
247
+ doc: string;
248
+ };
249
+ getVectorStoreFile: {
250
+ comment: string;
251
+ doc: string;
252
+ };
253
+ deleteVectorStoreFile: {
254
+ comment: string;
255
+ doc: string;
256
+ };
257
+ createVectorStoreFileBatch: {
258
+ comment: string;
259
+ doc: string;
260
+ };
261
+ getVectorStoreFileBatch: {
262
+ comment: string;
263
+ doc: string;
264
+ };
265
+ cancelVectorStoreFileBatch: {
266
+ comment: string;
267
+ doc: string;
268
+ };
269
+ listFilesInVectorStoreBatch: {
270
+ comment: string;
271
+ doc: string;
272
+ };
273
+ createBatch: {
274
+ comment: string;
275
+ doc: string;
276
+ };
277
+ listBatches: {
278
+ comment: string;
279
+ doc: string;
280
+ };
281
+ retrieveBatch: {
282
+ comment: string;
283
+ doc: string;
284
+ };
285
+ cancelBatch: {
286
+ comment: string;
287
+ doc: string;
288
+ };
289
+ listAuditLogs: {
290
+ comment: string;
291
+ doc: string;
292
+ };
293
+ listInvites: {
294
+ comment: string;
295
+ doc: string;
296
+ };
297
+ inviteUser: {
298
+ comment: string;
299
+ doc: string;
300
+ };
301
+ retrieveInvite: {
302
+ comment: string;
303
+ doc: string;
304
+ };
305
+ deleteInvite: {
306
+ comment: string;
307
+ doc: string;
308
+ };
309
+ listUsers: {
310
+ comment: string;
311
+ doc: string;
312
+ };
313
+ retrieveUser: {
314
+ comment: string;
315
+ doc: string;
316
+ };
317
+ modifyUser: {
318
+ comment: string;
319
+ doc: string;
320
+ };
321
+ deleteUser: {
322
+ comment: string;
323
+ doc: string;
324
+ };
325
+ listProjects: {
326
+ comment: string;
327
+ doc: string;
328
+ };
329
+ createProject: {
330
+ comment: string;
331
+ doc: string;
332
+ };
333
+ retrieveProject: {
334
+ comment: string;
335
+ doc: string;
336
+ };
337
+ modifyProject: {
338
+ comment: string;
339
+ doc: string;
340
+ };
341
+ archiveProject: {
342
+ comment: string;
343
+ doc: string;
344
+ };
345
+ listProjectUsers: {
346
+ comment: string;
347
+ doc: string;
348
+ };
349
+ createProjectUser: {
350
+ comment: string;
351
+ doc: string;
352
+ };
353
+ retrieveProjectUser: {
354
+ comment: string;
355
+ doc: string;
356
+ };
357
+ modifyProjectUser: {
358
+ comment: string;
359
+ doc: string;
360
+ };
361
+ deleteProjectUser: {
362
+ comment: string;
363
+ doc: string;
364
+ };
365
+ listProjectServiceAccounts: {
366
+ comment: string;
367
+ doc: string;
368
+ };
369
+ createProjectServiceAccount: {
370
+ comment: string;
371
+ doc: string;
372
+ };
373
+ retrieveProjectServiceAccount: {
374
+ comment: string;
375
+ doc: string;
376
+ };
377
+ deleteProjectServiceAccount: {
378
+ comment: string;
379
+ doc: string;
380
+ };
381
+ listProjectApiKeys: {
382
+ comment: string;
383
+ doc: string;
384
+ };
385
+ retrieveProjectApiKey: {
386
+ comment: string;
387
+ doc: string;
388
+ };
389
+ deleteProjectApiKey: {
390
+ comment: string;
391
+ doc: string;
392
+ };
393
+ };
394
+ protected get baseClient(): typeof integrationClient;
395
+ getApiClient: () => Promise<typeof integrationClient>;
396
+ }
397
+ //# sourceMappingURL=toolset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolset.d.ts","sourceRoot":"","sources":["../src/toolset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1D,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,aAAc,SAAQ,cAAc;IAC7C,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,OAAO,MAAc;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,iBAAiB,EAAE,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC1G,UAAU,WAAU;IACpB,WAAW,SACqH;gBAEpH,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,YAAY,CAAA;KAAE;IAOhD,SAAS,KAAK,WAAW,qBAExB;IAED,SAAS,KAAK,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAE/B;IAED,SAAS,KAAK,UAAU,6BAKvB;IAED,YAAY,0CAaV;CACL"}
@@ -0,0 +1,5 @@
1
+ export type OpenaiConfig = {
2
+ API_KEY: string;
3
+ [key: string]: any;
4
+ };
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/openai",
3
- "version": "1.0.1-alpha.2",
3
+ "version": "1.0.1-alpha.21",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/openai.esm.js",
@@ -48,9 +48,9 @@
48
48
  "license": "ISC",
49
49
  "dependencies": {
50
50
  "@hey-api/client-fetch": "^0.3.3",
51
- "zod": "^3.23.8",
51
+ "zod": "^3.24.0",
52
52
  "ts-to-zod": "^3.13.0",
53
- "@mastra/core": "^0.1.27-alpha.23"
53
+ "@mastra/core": "^0.1.27-alpha.42"
54
54
  },
55
55
  "scripts": {
56
56
  "analyze": "size-limit --why",
@@ -59,7 +59,7 @@
59
59
  "lint": "dts lint",
60
60
  "size": "size-limit",
61
61
  "start": "dts watch",
62
- "test": "jest",
62
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
63
63
  "clean": "rm -rf dist && rm -rf node_modules",
64
64
  "gen:zod:schema": "pnpx ts-to-zod src/client/types.gen.ts src/client/zodSchema.ts"
65
65
  }