/opt/canhelp/node_modules/openai/lib
NameSizeModeActions
responses/-0755rm
AbstractChatCompletionRunner.d.mts41970644editdlrm
AbstractChatCompletionRunner.d.mts.map23290644editdlrm
AbstractChatCompletionRunner.d.ts41880644editdlrm
AbstractChatCompletionRunner.d.ts.map23280644editdlrm
AbstractChatCompletionRunner.js151830644editdlrm
AbstractChatCompletionRunner.js.map101060644editdlrm
AbstractChatCompletionRunner.mjs147230644editdlrm
AbstractChatCompletionRunner.mjs.map101150644editdlrm
AssistantStream.d.mts41540644editdlrm
AssistantStream.d.mts.map35660644editdlrm
AssistantStream.d.ts41450644editdlrm
AssistantStream.d.ts.map35650644editdlrm
AssistantStream.js288890644editdlrm
AssistantStream.js.map186830644editdlrm
AssistantStream.mjs281270644editdlrm
AssistantStream.mjs.map186950644editdlrm
ChatCompletionRunner.d.mts12350644editdlrm
ChatCompletionRunner.d.mts.map9030644editdlrm
ChatCompletionRunner.d.ts12290644editdlrm
ChatCompletionRunner.d.ts.map9020644editdlrm
ChatCompletionRunner.js10460644editdlrm
ChatCompletionRunner.js.map7940644editdlrm
ChatCompletionRunner.mjs8230644editdlrm
ChatCompletionRunner.mjs.map7990644editdlrm
ChatCompletionStream.d.mts85620644editdlrm
ChatCompletionStream.d.mts.map43660644editdlrm
ChatCompletionStream.d.ts85550644editdlrm
ChatCompletionStream.d.ts.map43650644editdlrm
ChatCompletionStream.js256930644editdlrm
ChatCompletionStream.js.map178740644editdlrm
ChatCompletionStream.mjs252400644editdlrm
ChatCompletionStream.mjs.map179560644editdlrm
ChatCompletionStreamingRunner.d.mts15350644editdlrm
ChatCompletionStreamingRunner.d.mts.map11020644editdlrm
ChatCompletionStreamingRunner.d.ts15270644editdlrm
ChatCompletionStreamingRunner.d.ts.map11010644editdlrm
ChatCompletionStreamingRunner.js10350644editdlrm
ChatCompletionStreamingRunner.js.map7830644editdlrm
ChatCompletionStreamingRunner.mjs8220644editdlrm
ChatCompletionStreamingRunner.mjs.map7840644editdlrm
chatCompletionUtils.d.mts5600644editdlrm
chatCompletionUtils.d.mts.map4650644editdlrm
chatCompletionUtils.d.ts5580644editdlrm
chatCompletionUtils.d.ts.map4640644editdlrm
chatCompletionUtils.js5200644editdlrm
chatCompletionUtils.js.map4630644editdlrm
chatCompletionUtils.mjs2850644editdlrm
chatCompletionUtils.mjs.map4270644editdlrm
EventEmitter.d.mts26900644editdlrm
EventEmitter.d.mts.map13460644editdlrm
EventEmitter.d.ts26890644editdlrm
EventEmitter.d.ts.map13450644editdlrm
EventEmitter.js35160644editdlrm
EventEmitter.js.map17410644editdlrm
EventEmitter.mjs33300644editdlrm
EventEmitter.mjs.map17310644editdlrm
EventStream.d.mts33210644editdlrm
EventStream.d.mts.map18900644editdlrm
EventStream.d.ts33190644editdlrm
EventStream.d.ts.map18890644editdlrm
EventStream.js100800644editdlrm
EventStream.js.map51140644editdlrm
EventStream.mjs96960644editdlrm
EventStream.mjs.map51210644editdlrm
jsonschema.d.mts44960644editdlrm
jsonschema.d.mts.map27800644editdlrm
jsonschema.d.ts44950644editdlrm
jsonschema.d.ts.map27790644editdlrm
jsonschema.js7320644editdlrm
jsonschema.js.map2160644editdlrm
jsonschema.mjs6670644editdlrm
jsonschema.mjs.map2160644editdlrm
parser.d.mts39420644editdlrm
parser.d.mts.map30680644editdlrm
parser.d.ts39380644editdlrm
parser.d.ts.map30670644editdlrm
parser.js67860644editdlrm
parser.js.map53550644editdlrm
parser.mjs60770644editdlrm
parser.mjs.map52890644editdlrm
ResponsesParser.d.mts25610644editdlrm
ResponsesParser.d.mts.map22580644editdlrm
ResponsesParser.d.ts25570644editdlrm
ResponsesParser.d.ts.map22570644editdlrm
ResponsesParser.js56220644editdlrm
ResponsesParser.js.map48700644editdlrm
ResponsesParser.mjs52020644editdlrm
ResponsesParser.mjs.map48160644editdlrm
RunnableFunction.d.mts37660644editdlrm
RunnableFunction.d.mts.map24320644editdlrm
RunnableFunction.d.ts37620644editdlrm
RunnableFunction.d.ts.map24310644editdlrm
RunnableFunction.js6290644editdlrm
RunnableFunction.js.map3730644editdlrm
RunnableFunction.mjs4110644editdlrm
RunnableFunction.mjs.map3580644editdlrm
transform.d.mts1680644editdlrm
transform.d.mts.map1980644editdlrm
transform.d.ts1660644editdlrm
transform.d.ts.map1970644editdlrm
transform.js62160644editdlrm
transform.js.map58980644editdlrm
transform.mjs60980644editdlrm
transform.mjs.map58900644editdlrm
Util.d.mts2110644editdlrm
Util.d.mts.map2210644editdlrm
Util.d.ts2100644editdlrm
Util.d.ts.map2200644editdlrm
Util.js9500644editdlrm
Util.js.map8050644editdlrm
Util.mjs7920644editdlrm
Util.mjs.map7870644editdlrm
Edit: /opt/canhelp/node_modules/openai/lib/ChatCompletionStream.d.ts (8555B)
import OpenAI from "../index.js"; import { RequestOptions } from "../internal/request-options.js"; import { type ReadableStream } from "../internal/shim-types.js"; import { ParsedChatCompletion } from "../resources/chat/completions.js"; import { ChatCompletionTokenLogprob, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionCreateParamsBase, type ChatCompletionRole } from "../resources/chat/completions/completions.js"; import { AbstractChatCompletionRunner, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.js"; export interface ContentDeltaEvent { delta: string; snapshot: string; parsed: unknown | null; } export interface ContentDoneEvent { content: string; parsed: ParsedT | null; } export interface RefusalDeltaEvent { delta: string; snapshot: string; } export interface RefusalDoneEvent { refusal: string; } export interface FunctionToolCallArgumentsDeltaEvent { name: string; index: number; arguments: string; parsed_arguments: unknown; arguments_delta: string; } export interface FunctionToolCallArgumentsDoneEvent { name: string; index: number; arguments: string; parsed_arguments: unknown; } export interface LogProbsContentDeltaEvent { content: Array; snapshot: Array; } export interface LogProbsContentDoneEvent { content: Array; } export interface LogProbsRefusalDeltaEvent { refusal: Array; snapshot: Array; } export interface LogProbsRefusalDoneEvent { refusal: Array; } export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { content: (contentDelta: string, contentSnapshot: string) => void; chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; 'content.delta': (props: ContentDeltaEvent) => void; 'content.done': (props: ContentDoneEvent) => void; 'refusal.delta': (props: RefusalDeltaEvent) => void; 'refusal.done': (props: RefusalDoneEvent) => void; 'tool_calls.function.arguments.delta': (props: FunctionToolCallArgumentsDeltaEvent) => void; 'tool_calls.function.arguments.done': (props: FunctionToolCallArgumentsDoneEvent) => void; 'logprobs.content.delta': (props: LogProbsContentDeltaEvent) => void; 'logprobs.content.done': (props: LogProbsContentDoneEvent) => void; 'logprobs.refusal.delta': (props: LogProbsRefusalDeltaEvent) => void; 'logprobs.refusal.done': (props: LogProbsRefusalDoneEvent) => void; } export type ChatCompletionStreamParams = Omit & { stream?: true; }; export declare class ChatCompletionStream extends AbstractChatCompletionRunner, ParsedT> implements AsyncIterable { #private; constructor(params: ChatCompletionCreateParams | null); get currentChatCompletionSnapshot(): ChatCompletionSnapshot | undefined; /** * Intended for use on the frontend, consuming a stream produced with * `.toReadableStream()` on the backend. * * Note that messages sent to the model do not appear in `.on('message')` * in this context. */ static fromReadableStream(stream: ReadableStream): ChatCompletionStream; static createChatCompletion(client: OpenAI, params: ChatCompletionStreamParams, options?: RequestOptions): ChatCompletionStream; protected _createChatCompletion(client: OpenAI, params: ChatCompletionCreateParams, options?: RequestOptions): Promise>; protected _fromReadableStream(readableStream: ReadableStream, options?: RequestOptions): Promise; [Symbol.asyncIterator](this: ChatCompletionStream): AsyncIterator; toReadableStream(): ReadableStream; } /** * Represents a streamed chunk of a chat completion response returned by model, * based on the provided input. */ export interface ChatCompletionSnapshot { /** * A unique identifier for the chat completion. */ id: string; /** * A list of chat completion choices. Can be more than one if `n` is greater * than 1. */ choices: Array; /** * The Unix timestamp (in seconds) of when the chat completion was created. */ created: number; /** * The model to generate the completion. */ model: string; /** * This fingerprint represents the backend configuration that the model runs with. * * Can be used in conjunction with the `seed` request parameter to understand when * backend changes have been made that might impact determinism. */ system_fingerprint?: string; } export declare namespace ChatCompletionSnapshot { interface Choice { /** * A chat completion delta generated by streamed model responses. */ message: Choice.Message; /** * The reason the model stopped generating tokens. This will be `stop` if the model * hit a natural stop point or a provided stop sequence, `length` if the maximum * number of tokens specified in the request was reached, `content_filter` if * content was omitted due to a flag from our content filters, or `function_call` * if the model called a function. */ finish_reason: ChatCompletion.Choice['finish_reason'] | null; /** * Log probability information for the choice. */ logprobs: ChatCompletion.Choice.Logprobs | null; /** * The index of the choice in the list of choices. */ index: number; } namespace Choice { /** * A chat completion delta generated by streamed model responses. */ interface Message { /** * The contents of the chunk message. */ content?: string | null; refusal?: string | null; parsed?: unknown | null; /** * The name and arguments of a function that should be called, as generated by the * model. */ function_call?: Message.FunctionCall; tool_calls?: Array; /** * The role of the author of this message. */ role?: ChatCompletionRole; } namespace Message { interface ToolCall { /** * The ID of the tool call. */ id: string; function: ToolCall.Function; /** * The type of the tool. */ type: 'function'; } namespace ToolCall { interface Function { /** * The arguments to call the function with, as generated by the model in JSON * format. Note that the model does not always generate valid JSON, and may * hallucinate parameters not defined by your function schema. Validate the * arguments in your code before calling your function. */ arguments: string; parsed_arguments?: unknown; /** * The name of the function to call. */ name: string; } } /** * The name and arguments of a function that should be called, as generated by the * model. */ interface FunctionCall { /** * The arguments to call the function with, as generated by the model in JSON * format. Note that the model does not always generate valid JSON, and may * hallucinate parameters not defined by your function schema. Validate the * arguments in your code before calling your function. */ arguments?: string; /** * The name of the function to call. */ name?: string; } } } } //# sourceMappingURL=ChatCompletionStream.d.ts.map