feat(agent): add voice input and photo attachments to assistant
Wire mic through Whisper-compatible transcriptions on LLM_BASE_URL. Photos upload to MinIO and reach the vision model as base64 image_url parts.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const clientChatAttachmentSchema = z.object({
|
||||
type: z.literal("image"),
|
||||
url: z.string().trim().min(1).max(2048),
|
||||
});
|
||||
|
||||
export const clientChatMessageSchema = z.object({
|
||||
role: z.enum(["user", "assistant"]),
|
||||
content: z.string().trim().min(1).max(8000),
|
||||
attachments: z.array(clientChatAttachmentSchema).max(3).optional(),
|
||||
});
|
||||
|
||||
export const clientChatInputSchema = z.object({
|
||||
stream: z.boolean().optional(),
|
||||
messages: z.array(clientChatMessageSchema).min(1).max(40),
|
||||
});
|
||||
|
||||
export type ClientChatAttachment = z.infer<typeof clientChatAttachmentSchema>;
|
||||
export type ClientChatMessage = z.infer<typeof clientChatMessageSchema>;
|
||||
Reference in New Issue
Block a user