@alpic-ai/api 0.0.0-dev.gd7a6f1d → 0.0.0-dev.gd83266c
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/dist/index.d.mts +2 -2
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -322,8 +322,8 @@ declare const contract: {
|
|
|
322
322
|
environmentId: z.ZodString;
|
|
323
323
|
content: z.ZodString;
|
|
324
324
|
source: z.ZodEnum<{
|
|
325
|
-
model: "model";
|
|
326
325
|
user: "user";
|
|
326
|
+
model: "model";
|
|
327
327
|
}>;
|
|
328
328
|
clientName: z.ZodNullable<z.ZodString>;
|
|
329
329
|
clientId: z.ZodNullable<z.ZodString>;
|
|
@@ -1601,8 +1601,8 @@ declare const contractForDocs: {
|
|
|
1601
1601
|
environmentId: z.ZodString;
|
|
1602
1602
|
content: z.ZodString;
|
|
1603
1603
|
source: z.ZodEnum<{
|
|
1604
|
-
model: "model";
|
|
1605
1604
|
user: "user";
|
|
1605
|
+
model: "model";
|
|
1606
1606
|
}>;
|
|
1607
1607
|
clientName: z.ZodNullable<z.ZodString>;
|
|
1608
1608
|
clientId: z.ZodNullable<z.ZodString>;
|
package/dist/index.mjs
CHANGED
|
@@ -864,6 +864,10 @@ const clampStringField = (field) => {
|
|
|
864
864
|
const withMin = field.minLength === null ? clamped : clamped.min(field.minLength);
|
|
865
865
|
return field.description ? withMin.describe(field.description) : withMin;
|
|
866
866
|
};
|
|
867
|
+
const unboundedArrayField = (field) => {
|
|
868
|
+
const unbounded = z.array(field.element);
|
|
869
|
+
return field.description ? unbounded.describe(field.description) : unbounded;
|
|
870
|
+
};
|
|
867
871
|
const toolDefinitionSchema = z.object({
|
|
868
872
|
name: z.string(),
|
|
869
873
|
title: z.string().optional().describe("Human-friendly name for the tool, used in the UI. If not provided, `name` will be used."),
|
|
@@ -1279,6 +1283,9 @@ const chatgptAiGeneratedFormDataSchema = chatgptSubmissionFormDataSchema.pick({
|
|
|
1279
1283
|
testCases: true,
|
|
1280
1284
|
negativeTestCases: true,
|
|
1281
1285
|
toolJustifications: true
|
|
1286
|
+
}).extend({
|
|
1287
|
+
testCases: unboundedArrayField(chatgptSubmissionFormDataSchema.shape.testCases),
|
|
1288
|
+
negativeTestCases: unboundedArrayField(chatgptSubmissionFormDataSchema.shape.negativeTestCases)
|
|
1282
1289
|
}).extend({
|
|
1283
1290
|
tagline: clampStringField(chatgptSubmissionFormDataSchema.shape.tagline),
|
|
1284
1291
|
testCases: z.array(positiveTestCaseDraftSchema).transform((cases) => toFixedLength(cases, 5, blankPositiveTestCase)),
|