doc_chat_ai
Version:
Backend SDK for ChatAI - Simple and efficient communication with ChatAI API
25 lines • 768 B
TypeScript
import { ChatAIConfig, ChatOptions, ChatResponse, ChatChunk } from "./types";
export declare class ChatAIClient {
private apiKey;
private timeout;
private origin;
private customHeaders;
constructor(config: ChatAIConfig);
/**
* Send a chat message and get a complete response
*/
chat(query: string, options?: ChatOptions): Promise<ChatResponse>;
/**
* Send a chat message and get a streaming response
*/
chatStream(query: string, options?: ChatOptions): AsyncGenerator<ChatChunk>;
/**
* Parse Server-Sent Events (SSE) stream
*/
private parseSSE;
/**
* Get client configuration (for debugging)
*/
getConfig(): Omit<ChatAIConfig, "apiKey">;
}
//# sourceMappingURL=client.d.ts.map