Skip to content

Commit

Permalink
fix(prompts): Make tool schema properties field optional (#6455)
Browse files Browse the repository at this point in the history
  • Loading branch information
cephalization authored and mikeldking committed Feb 19, 2025
1 parent 7224fc9 commit 53cf4ba
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app/src/schemas/toolSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ const jsonSchemaPropertiesSchema = z
export const jsonSchemaZodSchema = z
.object({
type: z.literal("object"),
properties: z.record(
z.union([
jsonSchemaPropertiesSchema,
z
.object({ anyOf: z.array(jsonSchemaPropertiesSchema) })
.describe("A list of possible parameter names to their definitions"),
])
),
properties: z
.record(
z.union([
jsonSchemaPropertiesSchema,
z
.object({ anyOf: z.array(jsonSchemaPropertiesSchema) })
.describe(
"A list of possible parameter names to their definitions"
),
])
)
.optional(),
required: z
.array(z.string())
.optional()
Expand Down

0 comments on commit 53cf4ba

Please sign in to comment.