sse-schemas.ts 379 B

12345678910111213141516
  1. import { z } from 'zod';
  2. // Schema definitions
  3. export const SseMessageSchema = z.object({
  4. content: z.array(z.object({
  5. index: z.number(),
  6. type: z.string(),
  7. text: z.object({
  8. value: z.string().describe('The message that should be appended to the chat window'),
  9. }),
  10. })),
  11. });
  12. // Type definitions
  13. export type SseMessage = z.infer<typeof SseMessageSchema>;