feat: add support for structured output and JSON schema validation

This commit is contained in:
Siddhant Rai
2025-08-13 13:29:51 +05:30
parent 56831fbcf2
commit 896dcf1f9e
13 changed files with 660 additions and 153 deletions

View File

@@ -33,6 +33,8 @@ export interface Answer {
thought: string;
sources: { title: string; text: string; source: string }[];
tool_calls: ToolCallsType[];
structured?: boolean;
schema?: object;
}
export interface Query {
@@ -46,6 +48,8 @@ export interface Query {
tool_calls?: ToolCallsType[];
error?: string;
attachments?: { id: string; fileName: string }[];
structured?: boolean;
schema?: object;
}
export interface RetrievalPayload {