import { Configuration as GentraceConfiguration, PipelineRun, PluginContext, SimpleHandler } from "@gentrace/core"; import OpenAI from "openai"; import { ChatCompletionParseParams, ParsedChatCompletion } from "openai/resources/beta/chat/completions"; import { RequestOptions } from "openai/core"; import { Completion, CreateEmbeddingResponse, EmbeddingCreateParams } from "openai/resources"; import { ChatCompletionChunk } from "openai/resources/chat"; import { GentraceBetaChatCompletions, GentraceChatCompletion, GentraceChatCompletionCreateParams, GentraceChatCompletionCreateParamsNonStreaming, GentraceChatCompletionCreateParamsStreaming, GentraceChatCompletions, GentraceClientOptions, GentraceCompletion, GentraceCompletionCreateParamsNonStreaming, GentraceCompletionCreateParamsStreaming, GentraceCompletions, GentraceEmbeddings, GentraceStream, OpenAIPipelineHandler } from "../openai"; import { ExtractParsedContentFromParams } from "openai/lib/parser"; import { Chat } from "openai/resources/beta/chat/chat"; declare class SimpleOpenAI extends OpenAIPipelineHandler implements SimpleHandler { beta: SimpleGentraceBeta; completions: SimpleGentraceCompletions; chat: SimpleGentraceChat; embeddings: SimpleGentraceEmbeddings; constructor(options: GentraceClientOptions); getConfig(): GentraceClientOptions; setPipelineRun(pipelineRun: PipelineRun): void; } declare class SimpleGentraceEmbeddings extends GentraceEmbeddings { constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); create(body: EmbeddingCreateParams & { pipelineSlug?: string; gentrace?: PluginContext; }, options?: RequestOptions): Promise; } export declare class SimpleGentraceCompletions extends GentraceCompletions { constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); create(body: Omit & { gentrace?: PluginContext; }, options?: RequestOptions): Promise; create(body: Omit & { gentrace?: PluginContext; }, options?: RequestOptions): Promise & { pipelineRunId?: string; }>; } export declare class SimpleGentraceBeta extends OpenAI.Beta { chat: SimpleGentraceBetaChat; constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); } export declare class SimpleGentraceBetaChat extends Chat { completions: SimpleGentraceBetaChatCompletions; constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); } declare class SimpleGentraceBetaChatCompletions extends GentraceBetaChatCompletions { constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); parse>(body: GentraceChatCompletionCreateParams, options?: RequestOptions): Promise>; } export declare class SimpleGentraceChat extends OpenAI.Chat { completions: SimpleGentraceChatCompletions; constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); } declare class SimpleGentraceChatCompletions extends GentraceChatCompletions { constructor({ client, pipelineRun, gentraceConfig, }: { client: OpenAI; pipelineRun?: PipelineRun; gentraceConfig: GentraceConfiguration; }); create(body: Omit & { gentrace?: PluginContext; }, options?: RequestOptions): Promise; create(body: Omit & { gentrace?: PluginContext; }, options?: RequestOptions): Promise & { pipelineRunId?: string; }>; } export { SimpleOpenAI };