mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-05-18 20:08:19 +00:00
15 lines
890 B
TypeScript
15 lines
890 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const aiResponseSchema = z.object({
|
|
message: z.string().describe('Brief 2-3 sentence summary in plain conversational sentences. NEVER include suggestions, bullet lists, markdown, headers, or field labels here — those belong in the suggestions array only.'),
|
|
suggestions: z.array(z.object({
|
|
id: z.string().describe('Unique suggestion ID like s1, s2'),
|
|
type: z.enum(['upsell', 'crosssell', 'retention', 'operational']),
|
|
title: z.string().describe('Short title for the suggestion pill'),
|
|
script: z.string().describe('2-3 sentence script the agent can read aloud to the caller'),
|
|
priority: z.enum(['high', 'medium', 'low']),
|
|
})).describe('0-4 contextual suggestions based on business rules. Include on first response, update on subsequent.'),
|
|
});
|
|
|
|
export type AiResponse = z.infer<typeof aiResponseSchema>;
|