import * as Core from "../../../core.js"; import { APIResource } from "../../../resource.js"; import { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from "../../../lib/ChatCompletionRunner.js"; export { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from "../../../lib/ChatCompletionRunner.js"; import { ChatCompletionStreamingRunner, ChatCompletionStreamingFunctionRunnerParams } from "../../../lib/ChatCompletionStreamingRunner.js"; export { ChatCompletionStreamingRunner, ChatCompletionStreamingFunctionRunnerParams, } from "../../../lib/ChatCompletionStreamingRunner.js"; import { BaseFunctionsArgs } from "../../../lib/RunnableFunction.js"; export { RunnableFunction, RunnableFunctions, RunnableFunctionWithParse, RunnableFunctionWithoutParse, ParsingFunction, ParsingToolFunction, } from "../../../lib/RunnableFunction.js"; import { RunnerOptions } from "../../../lib/AbstractChatCompletionRunner.js"; import { ChatCompletionToolRunnerParams } from "../../../lib/ChatCompletionRunner.js"; export { ChatCompletionToolRunnerParams } from "../../../lib/ChatCompletionRunner.js"; import { ChatCompletionStreamingToolRunnerParams } from "../../../lib/ChatCompletionStreamingRunner.js"; export { ChatCompletionStreamingToolRunnerParams } from "../../../lib/ChatCompletionStreamingRunner.js"; import { ChatCompletionStream, type ChatCompletionStreamParams } from "../../../lib/ChatCompletionStream.js"; import { ChatCompletion, ChatCompletionCreateParamsNonStreaming, ChatCompletionMessage, ChatCompletionMessageToolCall } from "../../chat/completions.js"; import { ExtractParsedContentFromParams } from "../../../lib/parser.js"; export { ChatCompletionStream, type ChatCompletionStreamParams } from "../../../lib/ChatCompletionStream.js"; export interface ParsedFunction extends ChatCompletionMessageToolCall.Function { parsed_arguments?: unknown; } export interface ParsedFunctionToolCall extends ChatCompletionMessageToolCall { function: ParsedFunction; } export interface ParsedChatCompletionMessage extends ChatCompletionMessage { parsed: ParsedT | null; tool_calls: Array; } export interface ParsedChoice extends ChatCompletion.Choice { message: ParsedChatCompletionMessage; } export interface ParsedChatCompletion extends ChatCompletion { choices: Array>; } export type ChatCompletionParseParams = ChatCompletionCreateParamsNonStreaming; export declare class Completions extends APIResource { parse>(body: Params, options?: Core.RequestOptions): Core.APIPromise>; /** * @deprecated - use `runTools` instead. */ runFunctions(body: ChatCompletionFunctionRunnerParams, options?: Core.RequestOptions): ChatCompletionRunner; runFunctions(body: ChatCompletionStreamingFunctionRunnerParams, options?: Core.RequestOptions): ChatCompletionStreamingRunner; /** * A convenience helper for using tool calls with the /chat/completions endpoint * which automatically calls the JavaScript functions you provide and sends their * results back to the /chat/completions endpoint, looping as long as the model * requests function calls. * * For more details and examples, see * [the docs](https://github.com/openai/openai-node#automated-function-calls) */ runTools, ParsedT = ExtractParsedContentFromParams>(body: Params, options?: RunnerOptions): ChatCompletionRunner; runTools, ParsedT = ExtractParsedContentFromParams>(body: Params, options?: RunnerOptions): ChatCompletionStreamingRunner; /** * Creates a chat completion stream */ stream>(body: Params, options?: Core.RequestOptions): ChatCompletionStream; } //# sourceMappingURL=completions.d.ts.map