UNPKG

@tanstack/ai

Version:

Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.

8 lines (7 loc) 372 B
/** * Parse JSON from a model/harness assistant string. * Strips a wrapping markdown fence when the whole payload is fenced. * If the model wrote prose first, take the last JSON object or array. */ export declare function parseJsonFromAssistantText(raw: string): unknown; export declare function appendOutputSchemaInstruction(prompt: string, schema: unknown): string;