UNPKG

zon-format

Version:

ZON: The most token-efficient serialization format for LLMs - beats CSV, TOON, JSON, and all competitors

18 lines (17 loc) 544 B
import OpenAI from 'openai'; /** * Wrapper for OpenAI SDK to automatically handle ZON format. */ export declare class ZOpenAI { private client; constructor(client: OpenAI); /** * Sends a chat completion request and parses the response as ZON. * Automatically appends ZON format instructions to the system prompt. */ chat(params: OpenAI.Chat.ChatCompletionCreateParamsNonStreaming): Promise<any>; } /** * Helper to create a ZOpenAI instance. */ export declare function createZOpenAI(apiKey?: string): ZOpenAI;