qualifire 1.1.4 → 1.1.6

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/lib/types.d.ts CHANGED
@@ -1,38 +1,38 @@
1
1
  import { z } from 'zod';
2
2
  export declare const messageSchema: z.ZodObject<{
3
3
  role: z.ZodString;
4
- content: z.ZodString;
4
+ content: z.ZodNullable<z.ZodString>;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  role: string;
7
- content: string;
7
+ content: string | null;
8
8
  }, {
9
9
  role: string;
10
- content: string;
10
+ content: string | null;
11
11
  }>;
12
12
  export declare const choiceSchema: z.ZodObject<{
13
13
  index: z.ZodNumber;
14
14
  message: z.ZodObject<{
15
15
  role: z.ZodString;
16
- content: z.ZodString;
16
+ content: z.ZodNullable<z.ZodString>;
17
17
  }, "strip", z.ZodTypeAny, {
18
18
  role: string;
19
- content: string;
19
+ content: string | null;
20
20
  }, {
21
21
  role: string;
22
- content: string;
22
+ content: string | null;
23
23
  }>;
24
24
  finish_reason: z.ZodOptional<z.ZodString>;
25
25
  }, "strip", z.ZodTypeAny, {
26
26
  message: {
27
27
  role: string;
28
- content: string;
28
+ content: string | null;
29
29
  };
30
30
  index: number;
31
31
  finish_reason?: string | undefined;
32
32
  }, {
33
33
  message: {
34
34
  role: string;
35
- content: string;
35
+ content: string | null;
36
36
  };
37
37
  index: number;
38
38
  finish_reason?: string | undefined;
@@ -54,31 +54,31 @@ export declare const inputSchema: z.ZodObject<{
54
54
  model: z.ZodString;
55
55
  messages: z.ZodArray<z.ZodObject<{
56
56
  role: z.ZodString;
57
- content: z.ZodString;
57
+ content: z.ZodNullable<z.ZodString>;
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  role: string;
60
- content: string;
60
+ content: string | null;
61
61
  }, {
62
62
  role: string;
63
- content: string;
63
+ content: string | null;
64
64
  }>, "many">;
65
65
  caller: z.ZodOptional<z.ZodString>;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  model: string;
68
68
  messages: {
69
69
  role: string;
70
- content: string;
70
+ content: string | null;
71
71
  }[];
72
72
  caller?: string | undefined;
73
73
  }, {
74
74
  model: string;
75
75
  messages: {
76
76
  role: string;
77
- content: string;
77
+ content: string | null;
78
78
  }[];
79
79
  caller?: string | undefined;
80
80
  }>;
81
- export type Input = z.infer<typeof inputSchema>;
81
+ export type Input = z.infer<typeof inputSchema> | string;
82
82
  export declare const outputSchema: z.ZodObject<{
83
83
  id: z.ZodString;
84
84
  created: z.ZodOptional<z.ZodNumber>;
@@ -87,26 +87,26 @@ export declare const outputSchema: z.ZodObject<{
87
87
  index: z.ZodNumber;
88
88
  message: z.ZodObject<{
89
89
  role: z.ZodString;
90
- content: z.ZodString;
90
+ content: z.ZodNullable<z.ZodString>;
91
91
  }, "strip", z.ZodTypeAny, {
92
92
  role: string;
93
- content: string;
93
+ content: string | null;
94
94
  }, {
95
95
  role: string;
96
- content: string;
96
+ content: string | null;
97
97
  }>;
98
98
  finish_reason: z.ZodOptional<z.ZodString>;
99
99
  }, "strip", z.ZodTypeAny, {
100
100
  message: {
101
101
  role: string;
102
- content: string;
102
+ content: string | null;
103
103
  };
104
104
  index: number;
105
105
  finish_reason?: string | undefined;
106
106
  }, {
107
107
  message: {
108
108
  role: string;
109
- content: string;
109
+ content: string | null;
110
110
  };
111
111
  index: number;
112
112
  finish_reason?: string | undefined;
@@ -131,7 +131,7 @@ export declare const outputSchema: z.ZodObject<{
131
131
  choices: {
132
132
  message: {
133
133
  role: string;
134
- content: string;
134
+ content: string | null;
135
135
  };
136
136
  index: number;
137
137
  finish_reason?: string | undefined;
@@ -149,7 +149,7 @@ export declare const outputSchema: z.ZodObject<{
149
149
  choices: {
150
150
  message: {
151
151
  role: string;
152
- content: string;
152
+ content: string | null;
153
153
  };
154
154
  index: number;
155
155
  finish_reason?: string | undefined;
@@ -162,34 +162,34 @@ export declare const outputSchema: z.ZodObject<{
162
162
  } | undefined;
163
163
  system_fingerprint?: string | undefined;
164
164
  }>;
165
- export type Output = z.infer<typeof outputSchema>;
165
+ export type Output = z.infer<typeof outputSchema> | string;
166
166
  export declare const evaluationSchema: z.ZodObject<{
167
167
  async: z.ZodBoolean;
168
168
  input: z.ZodObject<{
169
169
  model: z.ZodString;
170
170
  messages: z.ZodArray<z.ZodObject<{
171
171
  role: z.ZodString;
172
- content: z.ZodString;
172
+ content: z.ZodNullable<z.ZodString>;
173
173
  }, "strip", z.ZodTypeAny, {
174
174
  role: string;
175
- content: string;
175
+ content: string | null;
176
176
  }, {
177
177
  role: string;
178
- content: string;
178
+ content: string | null;
179
179
  }>, "many">;
180
180
  caller: z.ZodOptional<z.ZodString>;
181
181
  }, "strip", z.ZodTypeAny, {
182
182
  model: string;
183
183
  messages: {
184
184
  role: string;
185
- content: string;
185
+ content: string | null;
186
186
  }[];
187
187
  caller?: string | undefined;
188
188
  }, {
189
189
  model: string;
190
190
  messages: {
191
191
  role: string;
192
- content: string;
192
+ content: string | null;
193
193
  }[];
194
194
  caller?: string | undefined;
195
195
  }>;
@@ -201,26 +201,26 @@ export declare const evaluationSchema: z.ZodObject<{
201
201
  index: z.ZodNumber;
202
202
  message: z.ZodObject<{
203
203
  role: z.ZodString;
204
- content: z.ZodString;
204
+ content: z.ZodNullable<z.ZodString>;
205
205
  }, "strip", z.ZodTypeAny, {
206
206
  role: string;
207
- content: string;
207
+ content: string | null;
208
208
  }, {
209
209
  role: string;
210
- content: string;
210
+ content: string | null;
211
211
  }>;
212
212
  finish_reason: z.ZodOptional<z.ZodString>;
213
213
  }, "strip", z.ZodTypeAny, {
214
214
  message: {
215
215
  role: string;
216
- content: string;
216
+ content: string | null;
217
217
  };
218
218
  index: number;
219
219
  finish_reason?: string | undefined;
220
220
  }, {
221
221
  message: {
222
222
  role: string;
223
- content: string;
223
+ content: string | null;
224
224
  };
225
225
  index: number;
226
226
  finish_reason?: string | undefined;
@@ -245,7 +245,7 @@ export declare const evaluationSchema: z.ZodObject<{
245
245
  choices: {
246
246
  message: {
247
247
  role: string;
248
- content: string;
248
+ content: string | null;
249
249
  };
250
250
  index: number;
251
251
  finish_reason?: string | undefined;
@@ -263,7 +263,7 @@ export declare const evaluationSchema: z.ZodObject<{
263
263
  choices: {
264
264
  message: {
265
265
  role: string;
266
- content: string;
266
+ content: string | null;
267
267
  };
268
268
  index: number;
269
269
  finish_reason?: string | undefined;
@@ -282,7 +282,7 @@ export declare const evaluationSchema: z.ZodObject<{
282
282
  model: string;
283
283
  messages: {
284
284
  role: string;
285
- content: string;
285
+ content: string | null;
286
286
  }[];
287
287
  caller?: string | undefined;
288
288
  };
@@ -292,7 +292,7 @@ export declare const evaluationSchema: z.ZodObject<{
292
292
  choices: {
293
293
  message: {
294
294
  role: string;
295
- content: string;
295
+ content: string | null;
296
296
  };
297
297
  index: number;
298
298
  finish_reason?: string | undefined;
@@ -311,7 +311,7 @@ export declare const evaluationSchema: z.ZodObject<{
311
311
  model: string;
312
312
  messages: {
313
313
  role: string;
314
- content: string;
314
+ content: string | null;
315
315
  }[];
316
316
  caller?: string | undefined;
317
317
  };
@@ -321,7 +321,7 @@ export declare const evaluationSchema: z.ZodObject<{
321
321
  choices: {
322
322
  message: {
323
323
  role: string;
324
- content: string;
324
+ content: string | null;
325
325
  };
326
326
  index: number;
327
327
  finish_reason?: string | undefined;
package/lib/types.js CHANGED
@@ -4,7 +4,7 @@ exports.evaluationResponseSchema = exports.evaluationSchema = exports.outputSche
4
4
  const zod_1 = require("zod");
5
5
  exports.messageSchema = zod_1.z.object({
6
6
  role: zod_1.z.string(),
7
- content: zod_1.z.string(),
7
+ content: zod_1.z.string().nullable(),
8
8
  });
9
9
  exports.choiceSchema = zod_1.z.object({
10
10
  index: zod_1.z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qualifire",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Qualifire client SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -24,8 +24,8 @@
24
24
  "license": "MIT",
25
25
  "author": {
26
26
  "name": "Qualifire",
27
- "email": "admin@qualifire.xyz",
28
- "url": "https://qualifire.xyz"
27
+ "email": "support@qualifire.ai",
28
+ "url": "https://qualifire.ai"
29
29
  },
30
30
  "engines": {
31
31
  "node": ">=12.0"
@@ -114,6 +114,7 @@
114
114
  ]
115
115
  },
116
116
  "dependencies": {
117
+ "openai": "^4.28.4",
117
118
  "zod": "^3.22.4"
118
119
  }
119
120
  }