mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
fix: make support_contact field a nested object rather than a sub-document
This commit is contained in:
parent
39f4e725e5
commit
b750f52727
3 changed files with 23 additions and 14 deletions
|
|
@ -27,6 +27,14 @@ export const agentToolResourcesSchema = z
|
|||
})
|
||||
.optional();
|
||||
|
||||
/** Support contact schema for agent */
|
||||
export const agentSupportContactSchema = z
|
||||
.object({
|
||||
name: z.string().optional(),
|
||||
email: z.string().email().optional(),
|
||||
})
|
||||
.optional();
|
||||
|
||||
/** Base agent schema with all common fields */
|
||||
export const agentBaseSchema = z.object({
|
||||
name: z.string().nullable().optional(),
|
||||
|
|
@ -42,6 +50,8 @@ export const agentBaseSchema = z.object({
|
|||
recursion_limit: z.number().optional(),
|
||||
conversation_starters: z.array(z.string()).optional(),
|
||||
tool_resources: agentToolResourcesSchema,
|
||||
support_contact: agentSupportContactSchema,
|
||||
category: z.string().optional(),
|
||||
});
|
||||
|
||||
/** Create schema extends base with required fields for creation */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue