UNPKG

aiwrapper

Version:

A Universal AI Wrapper for JavaScript & TypeScript

11 lines (10 loc) 540 B
import { LangResponseSchema } from "./language-provider"; /** * Generate a prompt for extracting structured data based on a schema * This is a fallback for LLMs that don't support structured output in their API. * For example, we use it with Anthropic. * @param prompt The instruction for the LLM (e.g., "List all planets with their diameters") * @param schema The schema that the output should conform to * @returns A formatted prompt string */ export declare function addInstructionAboutSchema(schema: LangResponseSchema): string;