document-outline-extractor
Version:
Extract structured outlines from documents with optional AI enhancement
24 lines • 795 B
TypeScript
import { ChatCompletionOptions, ChatCompletionResponse, OpenAIConfig } from './types';
export declare class OpenAIClient {
private config;
constructor(config: OpenAIConfig);
/**
* Generate outline using OpenAI
*/
generateOutline(systemPrompt: string, content: string, options?: {
temperature?: number;
maxTokens?: number;
maxCompletionTokens?: number;
}): Promise<string | null>;
/**
* Perform chat completion request
*/
chatCompletion(options: Partial<ChatCompletionOptions>): Promise<ChatCompletionResponse>;
/**
* Extract content from first choice
*/
extractContent(response: ChatCompletionResponse): string | null;
private buildUrl;
private safeReadText;
}
//# sourceMappingURL=openai.d.ts.map