diff --git a/openai-types/core.d.ts b/openai-types/core.d.ts index cd2c1b9..92a7b3e 100644 --- a/openai-types/core.d.ts +++ b/openai-types/core.d.ts @@ -25,7 +25,7 @@ export declare class APIPromise extends Promise> { private parseResponse; private parsedPromise; constructor(responsePromise: Promise, parseResponse?: (props: APIResponseProps) => PromiseOrValue>); - _thenUnwrap(transform: (data: T) => U): APIPromise; + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise; /** * Gets the raw `Response` instance instead of parsing the response * data. @@ -159,8 +159,8 @@ export declare abstract class AbstractPage implements AsyncIterable abstract getPaginatedItems(): Item[]; hasNextPage(): boolean; getNextPage(): Promise; - iterPages(): AsyncGenerator, void, unknown>; - [Symbol.asyncIterator](): AsyncGenerator, void, unknown>; + iterPages(): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } /** * This subclass of Promise will resolve to an instantiated Page once the request completes. @@ -180,7 +180,7 @@ export declare class PagePromise, Item = Re * console.log(item) * } */ - [Symbol.asyncIterator](): AsyncGenerator, void, unknown>; + [Symbol.asyncIterator](): AsyncGenerator; } export declare const createResponseHeaders: (headers: Awaited>['headers']) => Record; type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; diff --git a/openai-types/index.d.ts b/openai-types/index.d.ts index 4b967e0..865213b 100644 --- a/openai-types/index.d.ts +++ b/openai-types/index.d.ts @@ -1,9 +1,23 @@ -import * as Errors from "./error.js"; -import * as Uploads from "./uploads.js"; import { type Agent, type RequestInit } from "./_shims/index.js"; import * as Core from "./core.js"; +import * as Errors from "./error.js"; import * as Pagination from "./pagination.js"; +import { type CursorPageParams, CursorPageResponse, PageResponse } from "./pagination.js"; +import * as Uploads from "./uploads.js"; import * as API from "./resources/index.js"; +import { Batch, BatchCreateParams, BatchError, BatchListParams, BatchRequestCounts, Batches, BatchesPage } from "./resources/batches.js"; +import { Completion, CompletionChoice, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, CompletionUsage, Completions } from "./resources/completions.js"; +import { CreateEmbeddingResponse, Embedding, EmbeddingCreateParams, EmbeddingModel, Embeddings } from "./resources/embeddings.js"; +import { FileContent, FileCreateParams, FileDeleted, FileListParams, FileObject, FileObjectsPage, FilePurpose, Files } from "./resources/files.js"; +import { Image, ImageCreateVariationParams, ImageEditParams, ImageGenerateParams, ImageModel, Images, ImagesResponse } from "./resources/images.js"; +import { Model, ModelDeleted, Models, ModelsPage } from "./resources/models.js"; +import { Moderation, ModerationCreateParams, ModerationCreateResponse, ModerationImageURLInput, ModerationModel, ModerationMultiModalInput, ModerationTextInput, Moderations } from "./resources/moderations.js"; +import { Audio, AudioModel, AudioResponseFormat } from "./resources/audio/audio.js"; +import { Beta } from "./resources/beta/beta.js"; +import { Chat, ChatModel } from "./resources/chat/chat.js"; +import { ChatCompletion, ChatCompletionAssistantMessageParam, ChatCompletionAudio, ChatCompletionAudioParam, ChatCompletionChunk, ChatCompletionContentPart, ChatCompletionContentPartImage, ChatCompletionContentPartInputAudio, ChatCompletionContentPartRefusal, ChatCompletionContentPartText, ChatCompletionCreateParams, ChatCompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, ChatCompletionFunctionCallOption, ChatCompletionFunctionMessageParam, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionModality, ChatCompletionNamedToolChoice, ChatCompletionPredictionContent, ChatCompletionRole, ChatCompletionStreamOptions, ChatCompletionSystemMessageParam, ChatCompletionTokenLogprob, ChatCompletionTool, ChatCompletionToolChoiceOption, ChatCompletionToolMessageParam, ChatCompletionUserMessageParam } from "./resources/chat/completions.js"; +import { FineTuning } from "./resources/fine-tuning/fine-tuning.js"; +import { Upload, UploadCompleteParams, UploadCreateParams, Uploads as UploadsAPIUploads } from "./resources/uploads/uploads.js"; export interface ClientOptions { /** * Defaults to process.env['OPENAI_API_KEY']. @@ -130,103 +144,33 @@ export declare class OpenAI extends Core.APIClient { static toFile: typeof Uploads.toFile; static fileFromPath: typeof Uploads.fileFromPath; } -export declare const OpenAIError: typeof Errors.OpenAIError, APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError; +export { OpenAIError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js"; export import toFile = Uploads.toFile; export import fileFromPath = Uploads.fileFromPath; export declare namespace OpenAI { - export import RequestOptions = Core.RequestOptions; + export type RequestOptions = Core.RequestOptions; export import Page = Pagination.Page; - export import PageResponse = Pagination.PageResponse; + export { type PageResponse as PageResponse }; export import CursorPage = Pagination.CursorPage; - export import CursorPageParams = Pagination.CursorPageParams; - export import CursorPageResponse = Pagination.CursorPageResponse; - export import Completions = API.Completions; - export import Completion = API.Completion; - export import CompletionChoice = API.CompletionChoice; - export import CompletionUsage = API.CompletionUsage; - export import CompletionCreateParams = API.CompletionCreateParams; - export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming; - export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming; - export import Chat = API.Chat; - export import ChatModel = API.ChatModel; - export import ChatCompletion = API.ChatCompletion; - export import ChatCompletionAssistantMessageParam = API.ChatCompletionAssistantMessageParam; - export import ChatCompletionChunk = API.ChatCompletionChunk; - export import ChatCompletionContentPart = API.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = API.ChatCompletionContentPartImage; - export import ChatCompletionContentPartRefusal = API.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = API.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = API.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = API.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = API.ChatCompletionMessage; - export import ChatCompletionMessageParam = API.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = API.ChatCompletionMessageToolCall; - export import ChatCompletionNamedToolChoice = API.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = API.ChatCompletionRole; - export import ChatCompletionStreamOptions = API.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = API.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = API.ChatCompletionTokenLogprob; - export import ChatCompletionTool = API.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = API.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = API.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = API.ChatCompletionUserMessageParam; - export import ChatCompletionCreateParams = API.ChatCompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming; - export import Embeddings = API.Embeddings; - export import CreateEmbeddingResponse = API.CreateEmbeddingResponse; - export import Embedding = API.Embedding; - export import EmbeddingModel = API.EmbeddingModel; - export import EmbeddingCreateParams = API.EmbeddingCreateParams; - export import Files = API.Files; - export import FileContent = API.FileContent; - export import FileDeleted = API.FileDeleted; - export import FileObject = API.FileObject; - export import FilePurpose = API.FilePurpose; - export import FileObjectsPage = API.FileObjectsPage; - export import FileCreateParams = API.FileCreateParams; - export import FileListParams = API.FileListParams; - export import Images = API.Images; - export import Image = API.Image; - export import ImageModel = API.ImageModel; - export import ImagesResponse = API.ImagesResponse; - export import ImageCreateVariationParams = API.ImageCreateVariationParams; - export import ImageEditParams = API.ImageEditParams; - export import ImageGenerateParams = API.ImageGenerateParams; - export import Audio = API.Audio; - export import AudioModel = API.AudioModel; - export import AudioResponseFormat = API.AudioResponseFormat; - export import Moderations = API.Moderations; - export import Moderation = API.Moderation; - export import ModerationImageURLInput = API.ModerationImageURLInput; - export import ModerationModel = API.ModerationModel; - export import ModerationMultiModalInput = API.ModerationMultiModalInput; - export import ModerationTextInput = API.ModerationTextInput; - export import ModerationCreateResponse = API.ModerationCreateResponse; - export import ModerationCreateParams = API.ModerationCreateParams; - export import Models = API.Models; - export import Model = API.Model; - export import ModelDeleted = API.ModelDeleted; - export import ModelsPage = API.ModelsPage; - export import FineTuning = API.FineTuning; - export import Beta = API.Beta; - export import Batches = API.Batches; - export import Batch = API.Batch; - export import BatchError = API.BatchError; - export import BatchRequestCounts = API.BatchRequestCounts; - export import BatchesPage = API.BatchesPage; - export import BatchCreateParams = API.BatchCreateParams; - export import BatchListParams = API.BatchListParams; - export import Uploads = API.Uploads; - export import Upload = API.Upload; - export import UploadCreateParams = API.UploadCreateParams; - export import UploadCompleteParams = API.UploadCompleteParams; - export import ErrorObject = API.ErrorObject; - export import FunctionDefinition = API.FunctionDefinition; - export import FunctionParameters = API.FunctionParameters; - export import ResponseFormatJSONObject = API.ResponseFormatJSONObject; - export import ResponseFormatJSONSchema = API.ResponseFormatJSONSchema; - export import ResponseFormatText = API.ResponseFormatText; + export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse }; + export { Completions as Completions, type Completion as Completion, type CompletionChoice as CompletionChoice, type CompletionUsage as CompletionUsage, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; + export { Chat as Chat, type ChatModel as ChatModel, type ChatCompletion as ChatCompletion, type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, type ChatCompletionAudio as ChatCompletionAudio, type ChatCompletionAudioParam as ChatCompletionAudioParam, type ChatCompletionChunk as ChatCompletionChunk, type ChatCompletionContentPart as ChatCompletionContentPart, type ChatCompletionContentPartImage as ChatCompletionContentPartImage, type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, type ChatCompletionContentPartText as ChatCompletionContentPartText, type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, type ChatCompletionMessage as ChatCompletionMessage, type ChatCompletionMessageParam as ChatCompletionMessageParam, type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, type ChatCompletionModality as ChatCompletionModality, type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, type ChatCompletionPredictionContent as ChatCompletionPredictionContent, type ChatCompletionRole as ChatCompletionRole, type ChatCompletionStreamOptions as ChatCompletionStreamOptions, type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, type ChatCompletionTool as ChatCompletionTool, type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, type ChatCompletionCreateParams as ChatCompletionCreateParams, type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, }; + export { Embeddings as Embeddings, type CreateEmbeddingResponse as CreateEmbeddingResponse, type Embedding as Embedding, type EmbeddingModel as EmbeddingModel, type EmbeddingCreateParams as EmbeddingCreateParams, }; + export { Files as Files, type FileContent as FileContent, type FileDeleted as FileDeleted, type FileObject as FileObject, type FilePurpose as FilePurpose, FileObjectsPage as FileObjectsPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; + export { Images as Images, type Image as Image, type ImageModel as ImageModel, type ImagesResponse as ImagesResponse, type ImageCreateVariationParams as ImageCreateVariationParams, type ImageEditParams as ImageEditParams, type ImageGenerateParams as ImageGenerateParams, }; + export { Audio as Audio, type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat }; + export { Moderations as Moderations, type Moderation as Moderation, type ModerationImageURLInput as ModerationImageURLInput, type ModerationModel as ModerationModel, type ModerationMultiModalInput as ModerationMultiModalInput, type ModerationTextInput as ModerationTextInput, type ModerationCreateResponse as ModerationCreateResponse, type ModerationCreateParams as ModerationCreateParams, }; + export { Models as Models, type Model as Model, type ModelDeleted as ModelDeleted, ModelsPage as ModelsPage, }; + export { FineTuning as FineTuning }; + export { Beta as Beta }; + export { Batches as Batches, type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; + export { UploadsAPIUploads as Uploads, type Upload as Upload, type UploadCreateParams as UploadCreateParams, type UploadCompleteParams as UploadCompleteParams, }; + export type ErrorObject = API.ErrorObject; + export type FunctionDefinition = API.FunctionDefinition; + export type FunctionParameters = API.FunctionParameters; + export type ResponseFormatJSONObject = API.ResponseFormatJSONObject; + export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema; + export type ResponseFormatText = API.ResponseFormatText; } /** API Client for interfacing with the Azure OpenAI API. */ export interface AzureClientOptions extends ClientOptions { diff --git a/openai-types/internal/decoders/line.d.ts b/openai-types/internal/decoders/line.d.ts new file mode 100644 index 0000000..f9b0cff --- /dev/null +++ b/openai-types/internal/decoders/line.d.ts @@ -0,0 +1,21 @@ + +type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined; +/** + * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally + * reading lines from text. + * + * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 + */ +export declare class LineDecoder { + static NEWLINE_CHARS: Set; + static NEWLINE_REGEXP: RegExp; + buffer: string[]; + trailingCR: boolean; + textDecoder: any; + constructor(); + decode(chunk: Bytes): string[]; + decodeText(bytes: Bytes): string; + flush(): string[]; +} +export {}; +//# sourceMappingURL=line.d.ts.map \ No newline at end of file diff --git a/openai-types/lib/AbstractChatCompletionRunner.d.ts b/openai-types/lib/AbstractChatCompletionRunner.d.ts index 59d9c31..848700c 100644 --- a/openai-types/lib/AbstractChatCompletionRunner.d.ts +++ b/openai-types/lib/AbstractChatCompletionRunner.d.ts @@ -1,6 +1,6 @@ -import * as Core from '../core.js'; -import { type CompletionUsage } from '../resources/completions.js'; -import { type ChatCompletion, type ChatCompletionMessage, type ChatCompletionMessageParam, type ChatCompletionCreateParams } from '../resources/chat/completions.js'; +import * as Core from "../core.js"; +import { type CompletionUsage } from "../resources/completions.js"; +import { type ChatCompletion, type ChatCompletionMessage, type ChatCompletionMessageParam, type ChatCompletionCreateParams } from "../resources/chat/completions.js"; import { type BaseFunctionsArgs } from "./RunnableFunction.js"; import { ChatCompletionFunctionRunnerParams, ChatCompletionToolRunnerParams } from "./ChatCompletionRunner.js"; import { ChatCompletionStreamingFunctionRunnerParams, ChatCompletionStreamingToolRunnerParams } from "./ChatCompletionStreamingRunner.js"; diff --git a/openai-types/lib/AssistantStream.d.ts b/openai-types/lib/AssistantStream.d.ts index f034a86..dc70b5a 100644 --- a/openai-types/lib/AssistantStream.d.ts +++ b/openai-types/lib/AssistantStream.d.ts @@ -1,13 +1,12 @@ -import { Message, Text, ImageFile, TextDelta, Messages } from '../resources/beta/threads/messages.js'; -import * as Core from '../core.js'; -import { RequestOptions } from '../core.js'; -import { Run, RunCreateParamsBase, Runs, RunSubmitToolOutputsParamsBase } from '../resources/beta/threads/runs/runs.js'; -import { type ReadableStream } from '../_shims/index.js'; -import { AssistantStreamEvent } from '../resources/beta/assistants.js'; -import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from '../resources/beta/threads/runs/steps.js'; -import { ThreadCreateAndRunParamsBase, Threads } from '../resources/beta/threads/threads.js'; +import { Message, Text, ImageFile, TextDelta, MessageDelta } from "../resources/beta/threads/messages.js"; +import * as Core from "../core.js"; +import { RequestOptions } from "../core.js"; +import { Run, RunCreateParamsBase, Runs, RunSubmitToolOutputsParamsBase } from "../resources/beta/threads/runs/runs.js"; +import { type ReadableStream } from "../_shims/index.js"; +import { AssistantStreamEvent } from "../resources/beta/assistants.js"; +import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from "../resources/beta/threads/runs/steps.js"; +import { ThreadCreateAndRunParamsBase, Threads } from "../resources/beta/threads/threads.js"; import { BaseEvents, EventStream } from "./EventStream.js"; -import MessageDelta = Messages.MessageDelta; export interface AssistantStreamEvents extends BaseEvents { run: (run: Run) => void; messageCreated: (message: Message) => void; diff --git a/openai-types/lib/ChatCompletionRunner.d.ts b/openai-types/lib/ChatCompletionRunner.d.ts index 95a6504..dcf390a 100644 --- a/openai-types/lib/ChatCompletionRunner.d.ts +++ b/openai-types/lib/ChatCompletionRunner.d.ts @@ -1,8 +1,8 @@ -import { type ChatCompletionMessageParam, type ChatCompletionCreateParamsNonStreaming } from '../resources/chat/completions.js'; +import { type ChatCompletionMessageParam, type ChatCompletionCreateParamsNonStreaming } from "../resources/chat/completions.js"; import { type RunnableFunctions, type BaseFunctionsArgs, RunnableTools } from "./RunnableFunction.js"; import { AbstractChatCompletionRunner, AbstractChatCompletionRunnerEvents, RunnerOptions } from "./AbstractChatCompletionRunner.js"; -import OpenAI from '../index.js'; -import { AutoParseableTool } from '../lib/parser.js'; +import OpenAI from "../index.js"; +import { AutoParseableTool } from "../lib/parser.js"; export interface ChatCompletionRunnerEvents extends AbstractChatCompletionRunnerEvents { content: (content: string) => void; } diff --git a/openai-types/lib/ChatCompletionStream.d.ts b/openai-types/lib/ChatCompletionStream.d.ts index 3f098b6..052379f 100644 --- a/openai-types/lib/ChatCompletionStream.d.ts +++ b/openai-types/lib/ChatCompletionStream.d.ts @@ -1,9 +1,9 @@ -import * as Core from '../core.js'; -import { ChatCompletionTokenLogprob, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionCreateParamsBase } from '../resources/chat/completions.js'; +import * as Core from "../core.js"; +import { ChatCompletionTokenLogprob, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionCreateParamsBase } from "../resources/chat/completions.js"; import { AbstractChatCompletionRunner, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.js"; -import { type ReadableStream } from '../_shims/index.js'; -import OpenAI from '../index.js'; -import { ParsedChatCompletion } from '../resources/beta/chat/completions.js'; +import { type ReadableStream } from "../_shims/index.js"; +import OpenAI from "../index.js"; +import { ParsedChatCompletion } from "../resources/beta/chat/completions.js"; export interface ContentDeltaEvent { delta: string; snapshot: string; diff --git a/openai-types/lib/ChatCompletionStreamingRunner.d.ts b/openai-types/lib/ChatCompletionStreamingRunner.d.ts index 7b2710c..b092b93 100644 --- a/openai-types/lib/ChatCompletionStreamingRunner.d.ts +++ b/openai-types/lib/ChatCompletionStreamingRunner.d.ts @@ -1,10 +1,10 @@ -import { type ChatCompletionChunk, type ChatCompletionCreateParamsStreaming } from '../resources/chat/completions.js'; +import { type ChatCompletionChunk, type ChatCompletionCreateParamsStreaming } from "../resources/chat/completions.js"; import { RunnerOptions, type AbstractChatCompletionRunnerEvents } from "./AbstractChatCompletionRunner.js"; -import { type ReadableStream } from '../_shims/index.js'; +import { type ReadableStream } from "../_shims/index.js"; import { RunnableTools, type BaseFunctionsArgs, type RunnableFunctions } from "./RunnableFunction.js"; import { ChatCompletionSnapshot, ChatCompletionStream } from "./ChatCompletionStream.js"; -import OpenAI from '../index.js'; -import { AutoParseableTool } from '../lib/parser.js'; +import OpenAI from "../index.js"; +import { AutoParseableTool } from "../lib/parser.js"; export interface ChatCompletionStreamEvents extends AbstractChatCompletionRunnerEvents { content: (contentDelta: string, contentSnapshot: string) => void; chunk: (chunk: ChatCompletionChunk, snapshot: ChatCompletionSnapshot) => void; diff --git a/openai-types/lib/EventStream.d.ts b/openai-types/lib/EventStream.d.ts index 6051baa..a37a44a 100644 --- a/openai-types/lib/EventStream.d.ts +++ b/openai-types/lib/EventStream.d.ts @@ -1,5 +1,5 @@ -import { APIUserAbortError, OpenAIError } from '../error.js'; +import { APIUserAbortError, OpenAIError } from "../error.js"; export declare class EventStream { #private; controller: AbortController; diff --git a/openai-types/lib/chatCompletionUtils.d.ts b/openai-types/lib/chatCompletionUtils.d.ts index 7dcf86f..dd86d34 100644 --- a/openai-types/lib/chatCompletionUtils.d.ts +++ b/openai-types/lib/chatCompletionUtils.d.ts @@ -1,4 +1,4 @@ -import { type ChatCompletionAssistantMessageParam, type ChatCompletionFunctionMessageParam, type ChatCompletionMessageParam, type ChatCompletionToolMessageParam } from '../resources.js'; +import { type ChatCompletionAssistantMessageParam, type ChatCompletionFunctionMessageParam, type ChatCompletionMessageParam, type ChatCompletionToolMessageParam } from "../resources.js"; export declare const isAssistantMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionAssistantMessageParam; export declare const isFunctionMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionFunctionMessageParam; export declare const isToolMessage: (message: ChatCompletionMessageParam | null | undefined) => message is ChatCompletionToolMessageParam; diff --git a/openai-types/resources/audio/audio.d.ts b/openai-types/resources/audio/audio.d.ts index f52e6fe..9726830 100644 --- a/openai-types/resources/audio/audio.d.ts +++ b/openai-types/resources/audio/audio.d.ts @@ -1,8 +1,10 @@ import { APIResource } from "../../resource.js"; -import * as AudioAPI from "./audio.js"; import * as SpeechAPI from "./speech.js"; +import { Speech, SpeechCreateParams, SpeechModel } from "./speech.js"; import * as TranscriptionsAPI from "./transcriptions.js"; +import { Transcription, TranscriptionCreateParams, TranscriptionCreateResponse, TranscriptionSegment, TranscriptionVerbose, TranscriptionWord, Transcriptions } from "./transcriptions.js"; import * as TranslationsAPI from "./translations.js"; +import { Translation, TranslationCreateParams, TranslationCreateResponse, TranslationVerbose, Translations } from "./translations.js"; export declare class Audio extends APIResource { transcriptions: TranscriptionsAPI.Transcriptions; translations: TranslationsAPI.Translations; @@ -15,22 +17,9 @@ export type AudioModel = 'whisper-1'; */ export type AudioResponseFormat = 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt'; export declare namespace Audio { - export import AudioModel = AudioAPI.AudioModel; - export import AudioResponseFormat = AudioAPI.AudioResponseFormat; - export import Transcriptions = TranscriptionsAPI.Transcriptions; - export import Transcription = TranscriptionsAPI.Transcription; - export import TranscriptionSegment = TranscriptionsAPI.TranscriptionSegment; - export import TranscriptionVerbose = TranscriptionsAPI.TranscriptionVerbose; - export import TranscriptionWord = TranscriptionsAPI.TranscriptionWord; - export import TranscriptionCreateResponse = TranscriptionsAPI.TranscriptionCreateResponse; - type TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; - export import Translations = TranslationsAPI.Translations; - export import Translation = TranslationsAPI.Translation; - export import TranslationVerbose = TranslationsAPI.TranslationVerbose; - export import TranslationCreateResponse = TranslationsAPI.TranslationCreateResponse; - type TranslationCreateParams = TranslationsAPI.TranslationCreateParams; - export import Speech = SpeechAPI.Speech; - export import SpeechModel = SpeechAPI.SpeechModel; - export import SpeechCreateParams = SpeechAPI.SpeechCreateParams; + export { type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat }; + export { Transcriptions as Transcriptions, type Transcription as Transcription, type TranscriptionSegment as TranscriptionSegment, type TranscriptionVerbose as TranscriptionVerbose, type TranscriptionWord as TranscriptionWord, type TranscriptionCreateResponse as TranscriptionCreateResponse, type TranscriptionCreateParams as TranscriptionCreateParams, }; + export { Translations as Translations, type Translation as Translation, type TranslationVerbose as TranslationVerbose, type TranslationCreateResponse as TranslationCreateResponse, type TranslationCreateParams as TranslationCreateParams, }; + export { Speech as Speech, type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams }; } //# sourceMappingURL=audio.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/audio/index.d.ts b/openai-types/resources/audio/index.d.ts index 6b848f8..82edc8b 100644 --- a/openai-types/resources/audio/index.d.ts +++ b/openai-types/resources/audio/index.d.ts @@ -1,5 +1,5 @@ -export { AudioModel, AudioResponseFormat, Audio } from "./audio.js"; -export { SpeechModel, SpeechCreateParams, Speech } from "./speech.js"; -export { Transcription, TranscriptionSegment, TranscriptionVerbose, TranscriptionWord, TranscriptionCreateResponse, TranscriptionCreateParams, Transcriptions, } from "./transcriptions.js"; -export { Translation, TranslationVerbose, TranslationCreateResponse, TranslationCreateParams, Translations, } from "./translations.js"; +export { Audio, type AudioModel, type AudioResponseFormat } from "./audio.js"; +export { Speech, type SpeechModel, type SpeechCreateParams } from "./speech.js"; +export { Transcriptions, type Transcription, type TranscriptionSegment, type TranscriptionVerbose, type TranscriptionWord, type TranscriptionCreateResponse, type TranscriptionCreateParams, } from "./transcriptions.js"; +export { Translations, type Translation, type TranslationVerbose, type TranslationCreateResponse, type TranslationCreateParams, } from "./translations.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/audio/speech.d.ts b/openai-types/resources/audio/speech.d.ts index fba5455..2a7e364 100644 --- a/openai-types/resources/audio/speech.d.ts +++ b/openai-types/resources/audio/speech.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as SpeechAPI from "./speech.js"; import { type Response } from "../../_shims/index.js"; export declare class Speech extends APIResource { /** @@ -15,7 +14,7 @@ export interface SpeechCreateParams { */ input: string; /** - * One of the available [TTS models](https://platform.openai.com/docs/models/tts): + * One of the available [TTS models](https://platform.openai.com/docs/models#tts): * `tts-1` or `tts-1-hd` */ model: (string & {}) | SpeechModel; @@ -23,7 +22,7 @@ export interface SpeechCreateParams { * The voice to use when generating the audio. Supported voices are `alloy`, * `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are * available in the - * [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options). + * [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). */ voice: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'; /** @@ -38,7 +37,6 @@ export interface SpeechCreateParams { speed?: number; } export declare namespace Speech { - export import SpeechModel = SpeechAPI.SpeechModel; - export import SpeechCreateParams = SpeechAPI.SpeechCreateParams; + export { type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams }; } //# sourceMappingURL=speech.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/audio/transcriptions.d.ts b/openai-types/resources/audio/transcriptions.d.ts index 7e2fbc2..73f10e9 100644 --- a/openai-types/resources/audio/transcriptions.d.ts +++ b/openai-types/resources/audio/transcriptions.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as TranscriptionsAPI from "./transcriptions.js"; import * as AudioAPI from "./audio.js"; export declare class Transcriptions extends APIResource { /** @@ -131,7 +130,7 @@ export interface TranscriptionCreateParams; } export declare namespace Transcriptions { - export import Transcription = TranscriptionsAPI.Transcription; - export import TranscriptionSegment = TranscriptionsAPI.TranscriptionSegment; - export import TranscriptionVerbose = TranscriptionsAPI.TranscriptionVerbose; - export import TranscriptionWord = TranscriptionsAPI.TranscriptionWord; - export import TranscriptionCreateResponse = TranscriptionsAPI.TranscriptionCreateResponse; - type TranscriptionCreateParams = TranscriptionsAPI.TranscriptionCreateParams; + export { type Transcription as Transcription, type TranscriptionSegment as TranscriptionSegment, type TranscriptionVerbose as TranscriptionVerbose, type TranscriptionWord as TranscriptionWord, type TranscriptionCreateResponse as TranscriptionCreateResponse, type TranscriptionCreateParams as TranscriptionCreateParams, }; } //# sourceMappingURL=transcriptions.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/audio/translations.d.ts b/openai-types/resources/audio/translations.d.ts index 6752f53..fa4de35 100644 --- a/openai-types/resources/audio/translations.d.ts +++ b/openai-types/resources/audio/translations.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as TranslationsAPI from "./translations.js"; import * as AudioAPI from "./audio.js"; import * as TranscriptionsAPI from "./transcriptions.js"; export declare class Translations extends APIResource { @@ -48,7 +47,7 @@ export interface TranslationCreateParams = TranslationsAPI.TranslationCreateParams; + export { type Translation as Translation, type TranslationVerbose as TranslationVerbose, type TranslationCreateResponse as TranslationCreateResponse, type TranslationCreateParams as TranslationCreateParams, }; } //# sourceMappingURL=translations.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/batches.d.ts b/openai-types/resources/batches.d.ts index e1b476d..26b56d4 100644 --- a/openai-types/resources/batches.d.ts +++ b/openai-types/resources/batches.d.ts @@ -181,11 +181,6 @@ export interface BatchCreateParams { export interface BatchListParams extends CursorPageParams { } export declare namespace Batches { - export import Batch = BatchesAPI.Batch; - export import BatchError = BatchesAPI.BatchError; - export import BatchRequestCounts = BatchesAPI.BatchRequestCounts; - export import BatchesPage = BatchesAPI.BatchesPage; - export import BatchCreateParams = BatchesAPI.BatchCreateParams; - export import BatchListParams = BatchesAPI.BatchListParams; + export { type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, }; } //# sourceMappingURL=batches.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/assistants.d.ts b/openai-types/resources/beta/assistants.d.ts index b6b482b..68a04cc 100644 --- a/openai-types/resources/beta/assistants.d.ts +++ b/openai-types/resources/beta/assistants.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as AssistantsAPI from "./assistants.js"; import * as Shared from "../shared.js"; import * as ChatAPI from "../chat/chat.js"; import * as MessagesAPI from "./threads/messages.js"; @@ -66,8 +65,8 @@ export interface Assistant { * ID of the model to use. You can use the * [List models](https://platform.openai.com/docs/api-reference/models/list) API to * see all of your available models, or see our - * [Model overview](https://platform.openai.com/docs/models/overview) for - * descriptions of them. + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. */ model: string; /** @@ -86,8 +85,8 @@ export interface Assistant { tools: Array; /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -201,6 +200,10 @@ export declare namespace AssistantStreamEvent { */ data: ThreadsAPI.Thread; event: 'thread.created'; + /** + * Whether to enable input audio transcription. + */ + enabled?: boolean; } /** * Occurs when a new @@ -474,7 +477,7 @@ export declare namespace AssistantStreamEvent { } /** * Occurs when an - * [error](https://platform.openai.com/docs/guides/error-codes/api-errors) occurs. + * [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. * This can happen due to an internal server error or a timeout. */ interface ErrorEvent { @@ -511,7 +514,7 @@ export declare namespace FileSearchTool { * * Note that the file search tool may output fewer than `max_num_results` results. * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ max_num_results?: number; @@ -520,7 +523,7 @@ export declare namespace FileSearchTool { * will use the `auto` ranker and a score_threshold of 0. * * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ ranking_options?: FileSearch.RankingOptions; @@ -531,7 +534,7 @@ export declare namespace FileSearchTool { * will use the `auto` ranker and a score_threshold of 0. * * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ interface RankingOptions { @@ -860,14 +863,18 @@ export interface ThreadStreamEvent { */ data: ThreadsAPI.Thread; event: 'thread.created'; + /** + * Whether to enable input audio transcription. + */ + enabled?: boolean; } export interface AssistantCreateParams { /** * ID of the model to use. You can use the * [List models](https://platform.openai.com/docs/api-reference/models/list) API to * see all of your available models, or see our - * [Model overview](https://platform.openai.com/docs/models/overview) for - * descriptions of them. + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. */ model: (string & {}) | ChatAPI.ChatModel; /** @@ -892,8 +899,8 @@ export interface AssistantCreateParams { name?: string | null; /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -1022,8 +1029,8 @@ export interface AssistantUpdateParams { * ID of the model to use. You can use the * [List models](https://platform.openai.com/docs/api-reference/models/list) API to * see all of your available models, or see our - * [Model overview](https://platform.openai.com/docs/models/overview) for - * descriptions of them. + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. */ model?: string; /** @@ -1032,8 +1039,8 @@ export interface AssistantUpdateParams { name?: string | null; /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -1117,8 +1124,8 @@ export interface AssistantListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -1128,20 +1135,6 @@ export interface AssistantListParams extends CursorPageParams { order?: 'asc' | 'desc'; } export declare namespace Assistants { - export import Assistant = AssistantsAPI.Assistant; - export import AssistantDeleted = AssistantsAPI.AssistantDeleted; - export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent; - export import AssistantTool = AssistantsAPI.AssistantTool; - export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool; - export import FileSearchTool = AssistantsAPI.FileSearchTool; - export import FunctionTool = AssistantsAPI.FunctionTool; - export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent; - export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent; - export import RunStreamEvent = AssistantsAPI.RunStreamEvent; - export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent; - export import AssistantsPage = AssistantsAPI.AssistantsPage; - export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams; - export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams; - export import AssistantListParams = AssistantsAPI.AssistantListParams; + export { type Assistant as Assistant, type AssistantDeleted as AssistantDeleted, type AssistantStreamEvent as AssistantStreamEvent, type AssistantTool as AssistantTool, type CodeInterpreterTool as CodeInterpreterTool, type FileSearchTool as FileSearchTool, type FunctionTool as FunctionTool, type MessageStreamEvent as MessageStreamEvent, type RunStepStreamEvent as RunStepStreamEvent, type RunStreamEvent as RunStreamEvent, type ThreadStreamEvent as ThreadStreamEvent, AssistantsPage as AssistantsPage, type AssistantCreateParams as AssistantCreateParams, type AssistantUpdateParams as AssistantUpdateParams, type AssistantListParams as AssistantListParams, }; } //# sourceMappingURL=assistants.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/beta.d.ts b/openai-types/resources/beta/beta.d.ts index de86801..01313f9 100644 --- a/openai-types/resources/beta/beta.d.ts +++ b/openai-types/resources/beta/beta.d.ts @@ -1,8 +1,12 @@ import { APIResource } from "../../resource.js"; import * as AssistantsAPI from "./assistants.js"; import * as ChatAPI from "./chat/chat.js"; +import { Assistant, AssistantCreateParams, AssistantDeleted, AssistantListParams, AssistantStreamEvent, AssistantTool, AssistantUpdateParams, Assistants, AssistantsPage, CodeInterpreterTool, FileSearchTool, FunctionTool, MessageStreamEvent, RunStepStreamEvent, RunStreamEvent, ThreadStreamEvent } from "./assistants.js"; import * as ThreadsAPI from "./threads/threads.js"; +import { AssistantResponseFormatOption, AssistantToolChoice, AssistantToolChoiceFunction, AssistantToolChoiceOption, Thread, ThreadCreateAndRunParams, ThreadCreateAndRunParamsNonStreaming, ThreadCreateAndRunParamsStreaming, ThreadCreateAndRunPollParams, ThreadCreateAndRunStreamParams, ThreadCreateParams, ThreadDeleted, ThreadUpdateParams, Threads } from "./threads/threads.js"; import * as VectorStoresAPI from "./vector-stores/vector-stores.js"; +import { AutoFileChunkingStrategyParam, FileChunkingStrategy, FileChunkingStrategyParam, OtherFileChunkingStrategyObject, StaticFileChunkingStrategy, StaticFileChunkingStrategyObject, StaticFileChunkingStrategyParam, VectorStore, VectorStoreCreateParams, VectorStoreDeleted, VectorStoreListParams, VectorStoreUpdateParams, VectorStores, VectorStoresPage } from "./vector-stores/vector-stores.js"; +import { Chat } from "./chat/chat.js"; export declare class Beta extends APIResource { vectorStores: VectorStoresAPI.VectorStores; chat: ChatAPI.Chat; @@ -10,50 +14,9 @@ export declare class Beta extends APIResource { threads: ThreadsAPI.Threads; } export declare namespace Beta { - export import VectorStores = VectorStoresAPI.VectorStores; - export import AutoFileChunkingStrategyParam = VectorStoresAPI.AutoFileChunkingStrategyParam; - export import FileChunkingStrategy = VectorStoresAPI.FileChunkingStrategy; - export import FileChunkingStrategyParam = VectorStoresAPI.FileChunkingStrategyParam; - export import OtherFileChunkingStrategyObject = VectorStoresAPI.OtherFileChunkingStrategyObject; - export import StaticFileChunkingStrategy = VectorStoresAPI.StaticFileChunkingStrategy; - export import StaticFileChunkingStrategyObject = VectorStoresAPI.StaticFileChunkingStrategyObject; - export import StaticFileChunkingStrategyParam = VectorStoresAPI.StaticFileChunkingStrategyParam; - export import VectorStore = VectorStoresAPI.VectorStore; - export import VectorStoreDeleted = VectorStoresAPI.VectorStoreDeleted; - export import VectorStoresPage = VectorStoresAPI.VectorStoresPage; - export import VectorStoreCreateParams = VectorStoresAPI.VectorStoreCreateParams; - export import VectorStoreUpdateParams = VectorStoresAPI.VectorStoreUpdateParams; - export import VectorStoreListParams = VectorStoresAPI.VectorStoreListParams; - export import Chat = ChatAPI.Chat; - export import Assistants = AssistantsAPI.Assistants; - export import Assistant = AssistantsAPI.Assistant; - export import AssistantDeleted = AssistantsAPI.AssistantDeleted; - export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent; - export import AssistantTool = AssistantsAPI.AssistantTool; - export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool; - export import FileSearchTool = AssistantsAPI.FileSearchTool; - export import FunctionTool = AssistantsAPI.FunctionTool; - export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent; - export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent; - export import RunStreamEvent = AssistantsAPI.RunStreamEvent; - export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent; - export import AssistantsPage = AssistantsAPI.AssistantsPage; - export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams; - export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams; - export import AssistantListParams = AssistantsAPI.AssistantListParams; - export import Threads = ThreadsAPI.Threads; - export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption; - export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice; - export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction; - export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption; - export import Thread = ThreadsAPI.Thread; - export import ThreadDeleted = ThreadsAPI.ThreadDeleted; - export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams; - export import ThreadUpdateParams = ThreadsAPI.ThreadUpdateParams; - export import ThreadCreateAndRunParams = ThreadsAPI.ThreadCreateAndRunParams; - export import ThreadCreateAndRunParamsNonStreaming = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming; - export import ThreadCreateAndRunParamsStreaming = ThreadsAPI.ThreadCreateAndRunParamsStreaming; - export import ThreadCreateAndRunPollParams = ThreadsAPI.ThreadCreateAndRunPollParams; - export import ThreadCreateAndRunStreamParams = ThreadsAPI.ThreadCreateAndRunStreamParams; + export { VectorStores as VectorStores, type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, type FileChunkingStrategy as FileChunkingStrategy, type FileChunkingStrategyParam as FileChunkingStrategyParam, type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy as StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam, type VectorStore as VectorStore, type VectorStoreDeleted as VectorStoreDeleted, VectorStoresPage as VectorStoresPage, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, }; + export { Chat }; + export { Assistants as Assistants, type Assistant as Assistant, type AssistantDeleted as AssistantDeleted, type AssistantStreamEvent as AssistantStreamEvent, type AssistantTool as AssistantTool, type CodeInterpreterTool as CodeInterpreterTool, type FileSearchTool as FileSearchTool, type FunctionTool as FunctionTool, type MessageStreamEvent as MessageStreamEvent, type RunStepStreamEvent as RunStepStreamEvent, type RunStreamEvent as RunStreamEvent, type ThreadStreamEvent as ThreadStreamEvent, AssistantsPage as AssistantsPage, type AssistantCreateParams as AssistantCreateParams, type AssistantUpdateParams as AssistantUpdateParams, type AssistantListParams as AssistantListParams, }; + export { Threads as Threads, type AssistantResponseFormatOption as AssistantResponseFormatOption, type AssistantToolChoice as AssistantToolChoice, type AssistantToolChoiceFunction as AssistantToolChoiceFunction, type AssistantToolChoiceOption as AssistantToolChoiceOption, type Thread as Thread, type ThreadDeleted as ThreadDeleted, type ThreadCreateParams as ThreadCreateParams, type ThreadUpdateParams as ThreadUpdateParams, type ThreadCreateAndRunParams as ThreadCreateAndRunParams, type ThreadCreateAndRunParamsNonStreaming as ThreadCreateAndRunParamsNonStreaming, type ThreadCreateAndRunParamsStreaming as ThreadCreateAndRunParamsStreaming, type ThreadCreateAndRunPollParams, type ThreadCreateAndRunStreamParams, }; } //# sourceMappingURL=beta.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/chat/completions.d.ts b/openai-types/resources/beta/chat/completions.d.ts index 4eaa78c..6a57f62 100644 --- a/openai-types/resources/beta/chat/completions.d.ts +++ b/openai-types/resources/beta/chat/completions.d.ts @@ -1,20 +1,20 @@ 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 { ChatCompletionStreamingRunner, type ChatCompletionStreamingFunctionRunnerParams, } from "../../../lib/ChatCompletionStreamingRunner.js"; +export { type RunnableFunction, type RunnableFunctions, type RunnableFunctionWithParse, type RunnableFunctionWithoutParse, ParsingFunction, ParsingToolFunction, } from "../../../lib/RunnableFunction.js"; +export { type ChatCompletionToolRunnerParams } from "../../../lib/ChatCompletionRunner.js"; +export { type ChatCompletionStreamingToolRunnerParams } from "../../../lib/ChatCompletionStreamingRunner.js"; export { ChatCompletionStream, type ChatCompletionStreamParams } from "../../../lib/ChatCompletionStream.js"; +export { ChatCompletionRunner, type ChatCompletionFunctionRunnerParams, } from "../../../lib/ChatCompletionRunner.js"; export interface ParsedFunction extends ChatCompletionMessageToolCall.Function { parsed_arguments?: unknown; } diff --git a/openai-types/resources/beta/index.d.ts b/openai-types/resources/beta/index.d.ts index c440a98..31cf05c 100644 --- a/openai-types/resources/beta/index.d.ts +++ b/openai-types/resources/beta/index.d.ts @@ -1,6 +1,6 @@ -export { Assistant, AssistantDeleted, AssistantStreamEvent, AssistantTool, CodeInterpreterTool, FileSearchTool, FunctionTool, MessageStreamEvent, RunStepStreamEvent, RunStreamEvent, ThreadStreamEvent, AssistantCreateParams, AssistantUpdateParams, AssistantListParams, AssistantsPage, Assistants, } from "./assistants.js"; -export { AssistantResponseFormatOption, AssistantToolChoice, AssistantToolChoiceFunction, AssistantToolChoiceOption, Thread, ThreadDeleted, ThreadCreateParams, ThreadUpdateParams, ThreadCreateAndRunParams, ThreadCreateAndRunParamsNonStreaming, ThreadCreateAndRunParamsStreaming, ThreadCreateAndRunPollParams, ThreadCreateAndRunStreamParams, Threads, } from "./threads/index.js"; +export { AssistantsPage, Assistants, type Assistant, type AssistantDeleted, type AssistantStreamEvent, type AssistantTool, type CodeInterpreterTool, type FileSearchTool, type FunctionTool, type MessageStreamEvent, type RunStepStreamEvent, type RunStreamEvent, type ThreadStreamEvent, type AssistantCreateParams, type AssistantUpdateParams, type AssistantListParams, } from "./assistants.js"; export { Beta } from "./beta.js"; export { Chat } from "./chat/index.js"; -export { AutoFileChunkingStrategyParam, FileChunkingStrategy, FileChunkingStrategyParam, OtherFileChunkingStrategyObject, StaticFileChunkingStrategy, StaticFileChunkingStrategyObject, StaticFileChunkingStrategyParam, VectorStore, VectorStoreDeleted, VectorStoreCreateParams, VectorStoreUpdateParams, VectorStoreListParams, VectorStoresPage, VectorStores, } from "./vector-stores/index.js"; +export { Threads, type AssistantResponseFormatOption, type AssistantToolChoice, type AssistantToolChoiceFunction, type AssistantToolChoiceOption, type Thread, type ThreadDeleted, type ThreadCreateParams, type ThreadUpdateParams, type ThreadCreateAndRunParams, type ThreadCreateAndRunParamsNonStreaming, type ThreadCreateAndRunParamsStreaming, type ThreadCreateAndRunPollParams, type ThreadCreateAndRunStreamParams, } from "./threads/index.js"; +export { VectorStoresPage, VectorStores, type AutoFileChunkingStrategyParam, type FileChunkingStrategy, type FileChunkingStrategyParam, type OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyParam, type VectorStore, type VectorStoreDeleted, type VectorStoreCreateParams, type VectorStoreUpdateParams, type VectorStoreListParams, } from "./vector-stores/index.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/index.d.ts b/openai-types/resources/beta/threads/index.d.ts index 0778670..51114dc 100644 --- a/openai-types/resources/beta/threads/index.d.ts +++ b/openai-types/resources/beta/threads/index.d.ts @@ -1,4 +1,4 @@ -export { Annotation, AnnotationDelta, FileCitationAnnotation, FileCitationDeltaAnnotation, FilePathAnnotation, FilePathDeltaAnnotation, ImageFile, ImageFileContentBlock, ImageFileDelta, ImageFileDeltaBlock, ImageURL, ImageURLContentBlock, ImageURLDelta, ImageURLDeltaBlock, Message, MessageContent, MessageContentDelta, MessageContentPartParam, MessageDeleted, MessageDelta, MessageDeltaEvent, RefusalContentBlock, RefusalDeltaBlock, Text, TextContentBlock, TextContentBlockParam, TextDelta, TextDeltaBlock, MessageCreateParams, MessageUpdateParams, MessageListParams, MessagesPage, Messages, } from "./messages.js"; -export { AssistantResponseFormatOption, AssistantToolChoice, AssistantToolChoiceFunction, AssistantToolChoiceOption, Thread, ThreadDeleted, ThreadCreateParams, ThreadUpdateParams, ThreadCreateAndRunParams, ThreadCreateAndRunParamsNonStreaming, ThreadCreateAndRunParamsStreaming, ThreadCreateAndRunPollParams, ThreadCreateAndRunStreamParams, Threads, } from "./threads.js"; -export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunUpdateParams, RunListParams, RunCreateAndPollParams, RunCreateAndStreamParams, RunStreamParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsStreamParams, RunsPage, Runs, } from "./runs/index.js"; +export { MessagesPage, Messages, type Annotation, type AnnotationDelta, type FileCitationAnnotation, type FileCitationDeltaAnnotation, type FilePathAnnotation, type FilePathDeltaAnnotation, type ImageFile, type ImageFileContentBlock, type ImageFileDelta, type ImageFileDeltaBlock, type ImageURL, type ImageURLContentBlock, type ImageURLDelta, type ImageURLDeltaBlock, type Message, type MessageContent, type MessageContentDelta, type MessageContentPartParam, type MessageDeleted, type MessageDelta, type MessageDeltaEvent, type RefusalContentBlock, type RefusalDeltaBlock, type Text, type TextContentBlock, type TextContentBlockParam, type TextDelta, type TextDeltaBlock, type MessageCreateParams, type MessageUpdateParams, type MessageListParams, } from "./messages.js"; +export { RunsPage, Runs, type RequiredActionFunctionToolCall, type Run, type RunStatus, type RunCreateParams, type RunCreateParamsNonStreaming, type RunCreateParamsStreaming, type RunUpdateParams, type RunListParams, type RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, } from "./runs/index.js"; +export { Threads, type AssistantResponseFormatOption, type AssistantToolChoice, type AssistantToolChoiceFunction, type AssistantToolChoiceOption, type Thread, type ThreadDeleted, type ThreadCreateParams, type ThreadUpdateParams, type ThreadCreateAndRunParams, type ThreadCreateAndRunParamsNonStreaming, type ThreadCreateAndRunParamsStreaming, type ThreadCreateAndRunPollParams, type ThreadCreateAndRunStreamParams, } from "./threads.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/messages.d.ts b/openai-types/resources/beta/threads/messages.d.ts index ab9fb3d..56f7a7f 100644 --- a/openai-types/resources/beta/threads/messages.d.ts +++ b/openai-types/resources/beta/threads/messages.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; -import * as MessagesAPI from "./messages.js"; import * as AssistantsAPI from "../assistants.js"; import { CursorPage, type CursorPageParams } from "../../../pagination.js"; export declare class Messages extends APIResource { @@ -539,8 +538,8 @@ export interface MessageListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -554,37 +553,6 @@ export interface MessageListParams extends CursorPageParams { run_id?: string; } export declare namespace Messages { - export import Annotation = MessagesAPI.Annotation; - export import AnnotationDelta = MessagesAPI.AnnotationDelta; - export import FileCitationAnnotation = MessagesAPI.FileCitationAnnotation; - export import FileCitationDeltaAnnotation = MessagesAPI.FileCitationDeltaAnnotation; - export import FilePathAnnotation = MessagesAPI.FilePathAnnotation; - export import FilePathDeltaAnnotation = MessagesAPI.FilePathDeltaAnnotation; - export import ImageFile = MessagesAPI.ImageFile; - export import ImageFileContentBlock = MessagesAPI.ImageFileContentBlock; - export import ImageFileDelta = MessagesAPI.ImageFileDelta; - export import ImageFileDeltaBlock = MessagesAPI.ImageFileDeltaBlock; - export import ImageURL = MessagesAPI.ImageURL; - export import ImageURLContentBlock = MessagesAPI.ImageURLContentBlock; - export import ImageURLDelta = MessagesAPI.ImageURLDelta; - export import ImageURLDeltaBlock = MessagesAPI.ImageURLDeltaBlock; - export import Message = MessagesAPI.Message; - export import MessageContent = MessagesAPI.MessageContent; - export import MessageContentDelta = MessagesAPI.MessageContentDelta; - export import MessageContentPartParam = MessagesAPI.MessageContentPartParam; - export import MessageDeleted = MessagesAPI.MessageDeleted; - export import MessageDelta = MessagesAPI.MessageDelta; - export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent; - export import RefusalContentBlock = MessagesAPI.RefusalContentBlock; - export import RefusalDeltaBlock = MessagesAPI.RefusalDeltaBlock; - export import Text = MessagesAPI.Text; - export import TextContentBlock = MessagesAPI.TextContentBlock; - export import TextContentBlockParam = MessagesAPI.TextContentBlockParam; - export import TextDelta = MessagesAPI.TextDelta; - export import TextDeltaBlock = MessagesAPI.TextDeltaBlock; - export import MessagesPage = MessagesAPI.MessagesPage; - export import MessageCreateParams = MessagesAPI.MessageCreateParams; - export import MessageUpdateParams = MessagesAPI.MessageUpdateParams; - export import MessageListParams = MessagesAPI.MessageListParams; + export { type Annotation as Annotation, type AnnotationDelta as AnnotationDelta, type FileCitationAnnotation as FileCitationAnnotation, type FileCitationDeltaAnnotation as FileCitationDeltaAnnotation, type FilePathAnnotation as FilePathAnnotation, type FilePathDeltaAnnotation as FilePathDeltaAnnotation, type ImageFile as ImageFile, type ImageFileContentBlock as ImageFileContentBlock, type ImageFileDelta as ImageFileDelta, type ImageFileDeltaBlock as ImageFileDeltaBlock, type ImageURL as ImageURL, type ImageURLContentBlock as ImageURLContentBlock, type ImageURLDelta as ImageURLDelta, type ImageURLDeltaBlock as ImageURLDeltaBlock, type Message as Message, type MessageContent as MessageContent, type MessageContentDelta as MessageContentDelta, type MessageContentPartParam as MessageContentPartParam, type MessageDeleted as MessageDeleted, type MessageDelta as MessageDelta, type MessageDeltaEvent as MessageDeltaEvent, type RefusalContentBlock as RefusalContentBlock, type RefusalDeltaBlock as RefusalDeltaBlock, type Text as Text, type TextContentBlock as TextContentBlock, type TextContentBlockParam as TextContentBlockParam, type TextDelta as TextDelta, type TextDeltaBlock as TextDeltaBlock, MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, }; } //# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/runs/index.d.ts b/openai-types/resources/beta/threads/runs/index.d.ts index aa2b2e6..30de79d 100644 --- a/openai-types/resources/beta/threads/runs/index.d.ts +++ b/openai-types/resources/beta/threads/runs/index.d.ts @@ -1,3 +1,3 @@ -export { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta, FileSearchToolCall, FileSearchToolCallDelta, FunctionToolCall, FunctionToolCallDelta, MessageCreationStepDetails, RunStep, RunStepDelta, RunStepDeltaEvent, RunStepDeltaMessageDelta, RunStepInclude, ToolCall, ToolCallDelta, ToolCallDeltaObject, ToolCallsStepDetails, StepRetrieveParams, StepListParams, RunStepsPage, Steps, } from "./steps.js"; -export { RequiredActionFunctionToolCall, Run, RunStatus, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunUpdateParams, RunListParams, RunCreateAndPollParams, RunCreateAndStreamParams, RunStreamParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsStreamParams, RunsPage, Runs, } from "./runs.js"; +export { RunStepsPage, Steps, type CodeInterpreterLogs, type CodeInterpreterOutputImage, type CodeInterpreterToolCall, type CodeInterpreterToolCallDelta, type FileSearchToolCall, type FileSearchToolCallDelta, type FunctionToolCall, type FunctionToolCallDelta, type MessageCreationStepDetails, type RunStep, type RunStepDelta, type RunStepDeltaEvent, type RunStepDeltaMessageDelta, type RunStepInclude, type ToolCall, type ToolCallDelta, type ToolCallDeltaObject, type ToolCallsStepDetails, type StepRetrieveParams, type StepListParams, } from "./steps.js"; +export { RunsPage, Runs, type RequiredActionFunctionToolCall, type Run, type RunStatus, type RunCreateParams, type RunCreateParamsNonStreaming, type RunCreateParamsStreaming, type RunUpdateParams, type RunListParams, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, } from "./runs.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/runs/runs.d.ts b/openai-types/resources/beta/threads/runs/runs.d.ts index f1d6749..d7b1eff 100644 --- a/openai-types/resources/beta/threads/runs/runs.d.ts +++ b/openai-types/resources/beta/threads/runs/runs.d.ts @@ -9,6 +9,7 @@ import * as ChatAPI from "../../../chat/chat.js"; import * as MessagesAPI from "../messages.js"; import * as ThreadsAPI from "../threads.js"; import * as StepsAPI from "./steps.js"; +import { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta, FileSearchToolCall, FileSearchToolCallDelta, FunctionToolCall, FunctionToolCallDelta, MessageCreationStepDetails, RunStep, RunStepDelta, RunStepDeltaEvent, RunStepDeltaMessageDelta, RunStepInclude, RunStepsPage, StepListParams, StepRetrieveParams, Steps, ToolCall, ToolCallDelta, ToolCallDeltaObject, ToolCallsStepDetails } from "./steps.js"; import { CursorPage, type CursorPageParams } from "../../../../pagination.js"; import { Stream } from "../../../../streaming.js"; export declare class Runs extends APIResource { @@ -203,7 +204,7 @@ export interface Run { object: 'thread.run'; /** * Whether to enable - * [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) * during tool use. */ parallel_tool_calls: boolean; @@ -214,8 +215,8 @@ export interface Run { required_action: Run.RequiredAction | null; /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -393,7 +394,7 @@ export interface RunCreateParamsBase { * search result content. * * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ include?: Array; @@ -446,14 +447,14 @@ export interface RunCreateParamsBase { model?: (string & {}) | ChatAPI.ChatModel | null; /** * Body param: Whether to enable - * [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) * during tool use. */ parallel_tool_calls?: boolean; /** * Body param: Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -613,8 +614,8 @@ export interface RunListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -1198,44 +1199,7 @@ export declare namespace RunSubmitToolOutputsStreamParams { } } export declare namespace Runs { - export import RequiredActionFunctionToolCall = RunsAPI.RequiredActionFunctionToolCall; - export import Run = RunsAPI.Run; - export import RunStatus = RunsAPI.RunStatus; - export import RunsPage = RunsAPI.RunsPage; - export import RunCreateParams = RunsAPI.RunCreateParams; - export import RunCreateParamsNonStreaming = RunsAPI.RunCreateParamsNonStreaming; - export import RunCreateParamsStreaming = RunsAPI.RunCreateParamsStreaming; - export import RunUpdateParams = RunsAPI.RunUpdateParams; - export import RunListParams = RunsAPI.RunListParams; - export import RunCreateAndPollParams = RunsAPI.RunCreateAndPollParams; - export import RunCreateAndStreamParams = RunsAPI.RunCreateAndStreamParams; - export import RunStreamParams = RunsAPI.RunStreamParams; - export import RunSubmitToolOutputsParams = RunsAPI.RunSubmitToolOutputsParams; - export import RunSubmitToolOutputsParamsNonStreaming = RunsAPI.RunSubmitToolOutputsParamsNonStreaming; - export import RunSubmitToolOutputsParamsStreaming = RunsAPI.RunSubmitToolOutputsParamsStreaming; - export import RunSubmitToolOutputsAndPollParams = RunsAPI.RunSubmitToolOutputsAndPollParams; - export import RunSubmitToolOutputsStreamParams = RunsAPI.RunSubmitToolOutputsStreamParams; - export import Steps = StepsAPI.Steps; - export import CodeInterpreterLogs = StepsAPI.CodeInterpreterLogs; - export import CodeInterpreterOutputImage = StepsAPI.CodeInterpreterOutputImage; - export import CodeInterpreterToolCall = StepsAPI.CodeInterpreterToolCall; - export import CodeInterpreterToolCallDelta = StepsAPI.CodeInterpreterToolCallDelta; - export import FileSearchToolCall = StepsAPI.FileSearchToolCall; - export import FileSearchToolCallDelta = StepsAPI.FileSearchToolCallDelta; - export import FunctionToolCall = StepsAPI.FunctionToolCall; - export import FunctionToolCallDelta = StepsAPI.FunctionToolCallDelta; - export import MessageCreationStepDetails = StepsAPI.MessageCreationStepDetails; - export import RunStep = StepsAPI.RunStep; - export import RunStepDelta = StepsAPI.RunStepDelta; - export import RunStepDeltaEvent = StepsAPI.RunStepDeltaEvent; - export import RunStepDeltaMessageDelta = StepsAPI.RunStepDeltaMessageDelta; - export import RunStepInclude = StepsAPI.RunStepInclude; - export import ToolCall = StepsAPI.ToolCall; - export import ToolCallDelta = StepsAPI.ToolCallDelta; - export import ToolCallDeltaObject = StepsAPI.ToolCallDeltaObject; - export import ToolCallsStepDetails = StepsAPI.ToolCallsStepDetails; - export import RunStepsPage = StepsAPI.RunStepsPage; - export import StepRetrieveParams = StepsAPI.StepRetrieveParams; - export import StepListParams = StepsAPI.StepListParams; + export { type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, type Run as Run, type RunStatus as RunStatus, RunsPage as RunsPage, type RunCreateParams as RunCreateParams, type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, type RunCreateParamsStreaming as RunCreateParamsStreaming, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, }; + export { Steps as Steps, type CodeInterpreterLogs as CodeInterpreterLogs, type CodeInterpreterOutputImage as CodeInterpreterOutputImage, type CodeInterpreterToolCall as CodeInterpreterToolCall, type CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta, type FileSearchToolCall as FileSearchToolCall, type FileSearchToolCallDelta as FileSearchToolCallDelta, type FunctionToolCall as FunctionToolCall, type FunctionToolCallDelta as FunctionToolCallDelta, type MessageCreationStepDetails as MessageCreationStepDetails, type RunStep as RunStep, type RunStepDelta as RunStepDelta, type RunStepDeltaEvent as RunStepDeltaEvent, type RunStepDeltaMessageDelta as RunStepDeltaMessageDelta, type RunStepInclude as RunStepInclude, type ToolCall as ToolCall, type ToolCallDelta as ToolCallDelta, type ToolCallDeltaObject as ToolCallDeltaObject, type ToolCallsStepDetails as ToolCallsStepDetails, RunStepsPage as RunStepsPage, type StepRetrieveParams as StepRetrieveParams, type StepListParams as StepListParams, }; } //# sourceMappingURL=runs.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/runs/steps.d.ts b/openai-types/resources/beta/threads/runs/steps.d.ts index 423dafb..ae46f69 100644 --- a/openai-types/resources/beta/threads/runs/steps.d.ts +++ b/openai-types/resources/beta/threads/runs/steps.d.ts @@ -557,7 +557,7 @@ export interface StepRetrieveParams { * to fetch the file search result content. * * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ include?: Array; @@ -566,8 +566,8 @@ export interface StepListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -576,7 +576,7 @@ export interface StepListParams extends CursorPageParams { * to fetch the file search result content. * * See the - * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings) + * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) * for more information. */ include?: Array; @@ -587,26 +587,6 @@ export interface StepListParams extends CursorPageParams { order?: 'asc' | 'desc'; } export declare namespace Steps { - export import CodeInterpreterLogs = StepsAPI.CodeInterpreterLogs; - export import CodeInterpreterOutputImage = StepsAPI.CodeInterpreterOutputImage; - export import CodeInterpreterToolCall = StepsAPI.CodeInterpreterToolCall; - export import CodeInterpreterToolCallDelta = StepsAPI.CodeInterpreterToolCallDelta; - export import FileSearchToolCall = StepsAPI.FileSearchToolCall; - export import FileSearchToolCallDelta = StepsAPI.FileSearchToolCallDelta; - export import FunctionToolCall = StepsAPI.FunctionToolCall; - export import FunctionToolCallDelta = StepsAPI.FunctionToolCallDelta; - export import MessageCreationStepDetails = StepsAPI.MessageCreationStepDetails; - export import RunStep = StepsAPI.RunStep; - export import RunStepDelta = StepsAPI.RunStepDelta; - export import RunStepDeltaEvent = StepsAPI.RunStepDeltaEvent; - export import RunStepDeltaMessageDelta = StepsAPI.RunStepDeltaMessageDelta; - export import RunStepInclude = StepsAPI.RunStepInclude; - export import ToolCall = StepsAPI.ToolCall; - export import ToolCallDelta = StepsAPI.ToolCallDelta; - export import ToolCallDeltaObject = StepsAPI.ToolCallDeltaObject; - export import ToolCallsStepDetails = StepsAPI.ToolCallsStepDetails; - export import RunStepsPage = StepsAPI.RunStepsPage; - export import StepRetrieveParams = StepsAPI.StepRetrieveParams; - export import StepListParams = StepsAPI.StepListParams; + export { type CodeInterpreterLogs as CodeInterpreterLogs, type CodeInterpreterOutputImage as CodeInterpreterOutputImage, type CodeInterpreterToolCall as CodeInterpreterToolCall, type CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta, type FileSearchToolCall as FileSearchToolCall, type FileSearchToolCallDelta as FileSearchToolCallDelta, type FunctionToolCall as FunctionToolCall, type FunctionToolCallDelta as FunctionToolCallDelta, type MessageCreationStepDetails as MessageCreationStepDetails, type RunStep as RunStep, type RunStepDelta as RunStepDelta, type RunStepDeltaEvent as RunStepDeltaEvent, type RunStepDeltaMessageDelta as RunStepDeltaMessageDelta, type RunStepInclude as RunStepInclude, type ToolCall as ToolCall, type ToolCallDelta as ToolCallDelta, type ToolCallDeltaObject as ToolCallDeltaObject, type ToolCallsStepDetails as ToolCallsStepDetails, RunStepsPage as RunStepsPage, type StepRetrieveParams as StepRetrieveParams, type StepListParams as StepListParams, }; } //# sourceMappingURL=steps.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/threads/threads.d.ts b/openai-types/resources/beta/threads/threads.d.ts index cb601cb..2c916c0 100644 --- a/openai-types/resources/beta/threads/threads.d.ts +++ b/openai-types/resources/beta/threads/threads.d.ts @@ -7,8 +7,10 @@ import * as Shared from "../../shared.js"; import * as AssistantsAPI from "../assistants.js"; import * as ChatAPI from "../../chat/chat.js"; import * as MessagesAPI from "./messages.js"; +import { Annotation, AnnotationDelta, FileCitationAnnotation, FileCitationDeltaAnnotation, FilePathAnnotation, FilePathDeltaAnnotation, ImageFile, ImageFileContentBlock, ImageFileDelta, ImageFileDeltaBlock, ImageURL, ImageURLContentBlock, ImageURLDelta, ImageURLDeltaBlock, Message as MessagesAPIMessage, MessageContent, MessageContentDelta, MessageContentPartParam, MessageCreateParams, MessageDeleted, MessageDelta, MessageDeltaEvent, MessageListParams, MessageUpdateParams, Messages, MessagesPage, RefusalContentBlock, RefusalDeltaBlock, Text, TextContentBlock, TextContentBlockParam, TextDelta, TextDeltaBlock } from "./messages.js"; import * as VectorStoresAPI from "../vector-stores/vector-stores.js"; import * as RunsAPI from "./runs/runs.js"; +import { RequiredActionFunctionToolCall, Run, RunCreateAndPollParams, RunCreateAndStreamParams, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunListParams, RunStatus, RunStreamParams, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsStreamParams, RunUpdateParams, Runs, RunsPage } from "./runs/runs.js"; import { Stream } from "../../../streaming.js"; export declare class Threads extends APIResource { runs: RunsAPI.Runs; @@ -51,8 +53,8 @@ export declare class Threads extends APIResource { } /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -386,14 +388,14 @@ export interface ThreadCreateAndRunParamsBase { model?: (string & {}) | ChatAPI.ChatModel | null; /** * Whether to enable - * [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) * during tool use. */ parallel_tool_calls?: boolean; /** * Specifies the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -1207,69 +1209,8 @@ export declare namespace ThreadCreateAndRunStreamParams { } } export declare namespace Threads { - export import AssistantResponseFormatOption = ThreadsAPI.AssistantResponseFormatOption; - export import AssistantToolChoice = ThreadsAPI.AssistantToolChoice; - export import AssistantToolChoiceFunction = ThreadsAPI.AssistantToolChoiceFunction; - export import AssistantToolChoiceOption = ThreadsAPI.AssistantToolChoiceOption; - export import Thread = ThreadsAPI.Thread; - export import ThreadDeleted = ThreadsAPI.ThreadDeleted; - export import ThreadCreateParams = ThreadsAPI.ThreadCreateParams; - export import ThreadUpdateParams = ThreadsAPI.ThreadUpdateParams; - export import ThreadCreateAndRunParams = ThreadsAPI.ThreadCreateAndRunParams; - export import ThreadCreateAndRunParamsNonStreaming = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming; - export import ThreadCreateAndRunParamsStreaming = ThreadsAPI.ThreadCreateAndRunParamsStreaming; - export import ThreadCreateAndRunPollParams = ThreadsAPI.ThreadCreateAndRunPollParams; - export import ThreadCreateAndRunStreamParams = ThreadsAPI.ThreadCreateAndRunStreamParams; - export import Runs = RunsAPI.Runs; - export import RequiredActionFunctionToolCall = RunsAPI.RequiredActionFunctionToolCall; - export import Run = RunsAPI.Run; - export import RunStatus = RunsAPI.RunStatus; - export import RunsPage = RunsAPI.RunsPage; - export import RunCreateParams = RunsAPI.RunCreateParams; - export import RunCreateParamsNonStreaming = RunsAPI.RunCreateParamsNonStreaming; - export import RunCreateParamsStreaming = RunsAPI.RunCreateParamsStreaming; - export import RunUpdateParams = RunsAPI.RunUpdateParams; - export import RunListParams = RunsAPI.RunListParams; - export import RunCreateAndPollParams = RunsAPI.RunCreateAndPollParams; - export import RunCreateAndStreamParams = RunsAPI.RunCreateAndStreamParams; - export import RunStreamParams = RunsAPI.RunStreamParams; - export import RunSubmitToolOutputsParams = RunsAPI.RunSubmitToolOutputsParams; - export import RunSubmitToolOutputsParamsNonStreaming = RunsAPI.RunSubmitToolOutputsParamsNonStreaming; - export import RunSubmitToolOutputsParamsStreaming = RunsAPI.RunSubmitToolOutputsParamsStreaming; - export import RunSubmitToolOutputsAndPollParams = RunsAPI.RunSubmitToolOutputsAndPollParams; - export import RunSubmitToolOutputsStreamParams = RunsAPI.RunSubmitToolOutputsStreamParams; - export import Messages = MessagesAPI.Messages; - export import Annotation = MessagesAPI.Annotation; - export import AnnotationDelta = MessagesAPI.AnnotationDelta; - export import FileCitationAnnotation = MessagesAPI.FileCitationAnnotation; - export import FileCitationDeltaAnnotation = MessagesAPI.FileCitationDeltaAnnotation; - export import FilePathAnnotation = MessagesAPI.FilePathAnnotation; - export import FilePathDeltaAnnotation = MessagesAPI.FilePathDeltaAnnotation; - export import ImageFile = MessagesAPI.ImageFile; - export import ImageFileContentBlock = MessagesAPI.ImageFileContentBlock; - export import ImageFileDelta = MessagesAPI.ImageFileDelta; - export import ImageFileDeltaBlock = MessagesAPI.ImageFileDeltaBlock; - export import ImageURL = MessagesAPI.ImageURL; - export import ImageURLContentBlock = MessagesAPI.ImageURLContentBlock; - export import ImageURLDelta = MessagesAPI.ImageURLDelta; - export import ImageURLDeltaBlock = MessagesAPI.ImageURLDeltaBlock; - export import Message = MessagesAPI.Message; - export import MessageContent = MessagesAPI.MessageContent; - export import MessageContentDelta = MessagesAPI.MessageContentDelta; - export import MessageContentPartParam = MessagesAPI.MessageContentPartParam; - export import MessageDeleted = MessagesAPI.MessageDeleted; - export import MessageDelta = MessagesAPI.MessageDelta; - export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent; - export import RefusalContentBlock = MessagesAPI.RefusalContentBlock; - export import RefusalDeltaBlock = MessagesAPI.RefusalDeltaBlock; - export import Text = MessagesAPI.Text; - export import TextContentBlock = MessagesAPI.TextContentBlock; - export import TextContentBlockParam = MessagesAPI.TextContentBlockParam; - export import TextDelta = MessagesAPI.TextDelta; - export import TextDeltaBlock = MessagesAPI.TextDeltaBlock; - export import MessagesPage = MessagesAPI.MessagesPage; - export import MessageCreateParams = MessagesAPI.MessageCreateParams; - export import MessageUpdateParams = MessagesAPI.MessageUpdateParams; - export import MessageListParams = MessagesAPI.MessageListParams; + export { type AssistantResponseFormatOption as AssistantResponseFormatOption, type AssistantToolChoice as AssistantToolChoice, type AssistantToolChoiceFunction as AssistantToolChoiceFunction, type AssistantToolChoiceOption as AssistantToolChoiceOption, type Thread as Thread, type ThreadDeleted as ThreadDeleted, type ThreadCreateParams as ThreadCreateParams, type ThreadUpdateParams as ThreadUpdateParams, type ThreadCreateAndRunParams as ThreadCreateAndRunParams, type ThreadCreateAndRunParamsNonStreaming as ThreadCreateAndRunParamsNonStreaming, type ThreadCreateAndRunParamsStreaming as ThreadCreateAndRunParamsStreaming, type ThreadCreateAndRunPollParams, type ThreadCreateAndRunStreamParams, }; + export { Runs as Runs, type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, type Run as Run, type RunStatus as RunStatus, RunsPage as RunsPage, type RunCreateParams as RunCreateParams, type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, type RunCreateParamsStreaming as RunCreateParamsStreaming, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, }; + export { Messages as Messages, type Annotation as Annotation, type AnnotationDelta as AnnotationDelta, type FileCitationAnnotation as FileCitationAnnotation, type FileCitationDeltaAnnotation as FileCitationDeltaAnnotation, type FilePathAnnotation as FilePathAnnotation, type FilePathDeltaAnnotation as FilePathDeltaAnnotation, type ImageFile as ImageFile, type ImageFileContentBlock as ImageFileContentBlock, type ImageFileDelta as ImageFileDelta, type ImageFileDeltaBlock as ImageFileDeltaBlock, type ImageURL as ImageURL, type ImageURLContentBlock as ImageURLContentBlock, type ImageURLDelta as ImageURLDelta, type ImageURLDeltaBlock as ImageURLDeltaBlock, type MessagesAPIMessage as Message, type MessageContent as MessageContent, type MessageContentDelta as MessageContentDelta, type MessageContentPartParam as MessageContentPartParam, type MessageDeleted as MessageDeleted, type MessageDelta as MessageDelta, type MessageDeltaEvent as MessageDeltaEvent, type RefusalContentBlock as RefusalContentBlock, type RefusalDeltaBlock as RefusalDeltaBlock, type Text as Text, type TextContentBlock as TextContentBlock, type TextContentBlockParam as TextContentBlockParam, type TextDelta as TextDelta, type TextDeltaBlock as TextDeltaBlock, MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, }; } //# sourceMappingURL=threads.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/vector-stores/file-batches.d.ts b/openai-types/resources/beta/vector-stores/file-batches.d.ts index 58b8811..3eff462 100644 --- a/openai-types/resources/beta/vector-stores/file-batches.d.ts +++ b/openai-types/resources/beta/vector-stores/file-batches.d.ts @@ -1,7 +1,6 @@ import { APIResource } from "../../../resource.js"; import { Uploadable } from "../../../core.js"; import * as Core from "../../../core.js"; -import * as FileBatchesAPI from "./file-batches.js"; import * as FilesAPI from "./files.js"; import { VectorStoreFilesPage } from "./files.js"; import * as VectorStoresAPI from "./vector-stores.js"; @@ -125,8 +124,8 @@ export interface FileBatchListFilesParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -140,9 +139,7 @@ export interface FileBatchListFilesParams extends CursorPageParams { order?: 'asc' | 'desc'; } export declare namespace FileBatches { - export import VectorStoreFileBatch = FileBatchesAPI.VectorStoreFileBatch; - export import FileBatchCreateParams = FileBatchesAPI.FileBatchCreateParams; - export import FileBatchListFilesParams = FileBatchesAPI.FileBatchListFilesParams; + export { type VectorStoreFileBatch as VectorStoreFileBatch, type FileBatchCreateParams as FileBatchCreateParams, type FileBatchListFilesParams as FileBatchListFilesParams, }; } export { VectorStoreFilesPage }; //# sourceMappingURL=file-batches.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/vector-stores/files.d.ts b/openai-types/resources/beta/vector-stores/files.d.ts index 2bbb770..215c417 100644 --- a/openai-types/resources/beta/vector-stores/files.d.ts +++ b/openai-types/resources/beta/vector-stores/files.d.ts @@ -1,7 +1,6 @@ import { APIResource } from "../../../resource.js"; import { Uploadable } from "../../../core.js"; import * as Core from "../../../core.js"; -import * as FilesAPI from "./files.js"; import * as VectorStoresAPI from "./vector-stores.js"; import { CursorPage, type CursorPageParams } from "../../../pagination.js"; export declare class Files extends APIResource { @@ -140,8 +139,8 @@ export interface FileListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -155,10 +154,6 @@ export interface FileListParams extends CursorPageParams { order?: 'asc' | 'desc'; } export declare namespace Files { - export import VectorStoreFile = FilesAPI.VectorStoreFile; - export import VectorStoreFileDeleted = FilesAPI.VectorStoreFileDeleted; - export import VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; + export { type VectorStoreFile as VectorStoreFile, type VectorStoreFileDeleted as VectorStoreFileDeleted, VectorStoreFilesPage as VectorStoreFilesPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; } //# sourceMappingURL=files.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/vector-stores/index.d.ts b/openai-types/resources/beta/vector-stores/index.d.ts index 9761590..ed29e11 100644 --- a/openai-types/resources/beta/vector-stores/index.d.ts +++ b/openai-types/resources/beta/vector-stores/index.d.ts @@ -1,4 +1,4 @@ -export { AutoFileChunkingStrategyParam, FileChunkingStrategy, FileChunkingStrategyParam, OtherFileChunkingStrategyObject, StaticFileChunkingStrategy, StaticFileChunkingStrategyObject, StaticFileChunkingStrategyParam, VectorStore, VectorStoreDeleted, VectorStoreCreateParams, VectorStoreUpdateParams, VectorStoreListParams, VectorStoresPage, VectorStores, } from "./vector-stores.js"; -export { VectorStoreFile, VectorStoreFileDeleted, FileCreateParams, FileListParams, VectorStoreFilesPage, Files, } from "./files.js"; -export { VectorStoreFileBatch, FileBatchCreateParams, FileBatchListFilesParams, FileBatches, } from "./file-batches.js"; +export { FileBatches, type VectorStoreFileBatch, type FileBatchCreateParams, type FileBatchListFilesParams, } from "./file-batches.js"; +export { VectorStoreFilesPage, Files, type VectorStoreFile, type VectorStoreFileDeleted, type FileCreateParams, type FileListParams, } from "./files.js"; +export { VectorStoresPage, VectorStores, type AutoFileChunkingStrategyParam, type FileChunkingStrategy, type FileChunkingStrategyParam, type OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyParam, type VectorStore, type VectorStoreDeleted, type VectorStoreCreateParams, type VectorStoreUpdateParams, type VectorStoreListParams, } from "./vector-stores.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/beta/vector-stores/vector-stores.d.ts b/openai-types/resources/beta/vector-stores/vector-stores.d.ts index fc5e53c..1f545e5 100644 --- a/openai-types/resources/beta/vector-stores/vector-stores.d.ts +++ b/openai-types/resources/beta/vector-stores/vector-stores.d.ts @@ -1,8 +1,9 @@ import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; -import * as VectorStoresAPI from "./vector-stores.js"; import * as FileBatchesAPI from "./file-batches.js"; +import { FileBatchCreateParams, FileBatchListFilesParams, FileBatches, VectorStoreFileBatch } from "./file-batches.js"; import * as FilesAPI from "./files.js"; +import { FileCreateParams, FileListParams, Files, VectorStoreFile, VectorStoreFileDeleted, VectorStoreFilesPage } from "./files.js"; import { CursorPage, type CursorPageParams } from "../../../pagination.js"; export declare class VectorStores extends APIResource { files: FilesAPI.Files; @@ -264,8 +265,8 @@ export interface VectorStoreListParams extends CursorPageParams { /** * A cursor for use in pagination. `before` is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, - * ending with obj_foo, your subsequent call can include before=obj_foo in order to - * fetch the previous page of the list. + * starting with obj_foo, your subsequent call can include before=obj_foo in order + * to fetch the previous page of the list. */ before?: string; /** @@ -275,28 +276,8 @@ export interface VectorStoreListParams extends CursorPageParams { order?: 'asc' | 'desc'; } export declare namespace VectorStores { - export import AutoFileChunkingStrategyParam = VectorStoresAPI.AutoFileChunkingStrategyParam; - export import FileChunkingStrategy = VectorStoresAPI.FileChunkingStrategy; - export import FileChunkingStrategyParam = VectorStoresAPI.FileChunkingStrategyParam; - export import OtherFileChunkingStrategyObject = VectorStoresAPI.OtherFileChunkingStrategyObject; - export import StaticFileChunkingStrategy = VectorStoresAPI.StaticFileChunkingStrategy; - export import StaticFileChunkingStrategyObject = VectorStoresAPI.StaticFileChunkingStrategyObject; - export import StaticFileChunkingStrategyParam = VectorStoresAPI.StaticFileChunkingStrategyParam; - export import VectorStore = VectorStoresAPI.VectorStore; - export import VectorStoreDeleted = VectorStoresAPI.VectorStoreDeleted; - export import VectorStoresPage = VectorStoresAPI.VectorStoresPage; - export import VectorStoreCreateParams = VectorStoresAPI.VectorStoreCreateParams; - export import VectorStoreUpdateParams = VectorStoresAPI.VectorStoreUpdateParams; - export import VectorStoreListParams = VectorStoresAPI.VectorStoreListParams; - export import Files = FilesAPI.Files; - export import VectorStoreFile = FilesAPI.VectorStoreFile; - export import VectorStoreFileDeleted = FilesAPI.VectorStoreFileDeleted; - export import VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; - export import FileBatches = FileBatchesAPI.FileBatches; - export import VectorStoreFileBatch = FileBatchesAPI.VectorStoreFileBatch; - export import FileBatchCreateParams = FileBatchesAPI.FileBatchCreateParams; - export import FileBatchListFilesParams = FileBatchesAPI.FileBatchListFilesParams; + export { type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, type FileChunkingStrategy as FileChunkingStrategy, type FileChunkingStrategyParam as FileChunkingStrategyParam, type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy as StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam, type VectorStore as VectorStore, type VectorStoreDeleted as VectorStoreDeleted, VectorStoresPage as VectorStoresPage, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, }; + export { Files as Files, type VectorStoreFile as VectorStoreFile, type VectorStoreFileDeleted as VectorStoreFileDeleted, VectorStoreFilesPage as VectorStoreFilesPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; + export { FileBatches as FileBatches, type VectorStoreFileBatch as VectorStoreFileBatch, type FileBatchCreateParams as FileBatchCreateParams, type FileBatchListFilesParams as FileBatchListFilesParams, }; } //# sourceMappingURL=vector-stores.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/chat/chat.d.ts b/openai-types/resources/chat/chat.d.ts index e5cc0ae..187e7f6 100644 --- a/openai-types/resources/chat/chat.d.ts +++ b/openai-types/resources/chat/chat.d.ts @@ -1,43 +1,12 @@ import { APIResource } from "../../resource.js"; -import * as ChatAPI from "./chat.js"; import * as CompletionsAPI from "./completions.js"; +import { ChatCompletion, ChatCompletionAssistantMessageParam, ChatCompletionAudio, ChatCompletionAudioParam, ChatCompletionChunk, ChatCompletionContentPart, ChatCompletionContentPartImage, ChatCompletionContentPartInputAudio, ChatCompletionContentPartRefusal, ChatCompletionContentPartText, ChatCompletionCreateParams, ChatCompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, ChatCompletionFunctionCallOption, ChatCompletionFunctionMessageParam, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionModality, ChatCompletionNamedToolChoice, ChatCompletionPredictionContent, ChatCompletionRole, ChatCompletionStreamOptions, ChatCompletionSystemMessageParam, ChatCompletionTokenLogprob, ChatCompletionTool, ChatCompletionToolChoiceOption, ChatCompletionToolMessageParam, ChatCompletionUserMessageParam, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, CreateChatCompletionRequestMessage } from "./completions.js"; export declare class Chat extends APIResource { completions: CompletionsAPI.Completions; } -export type ChatModel = 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-realtime-preview-2024-10-01' | 'chatgpt-4o-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613'; +export type ChatModel = 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'chatgpt-4o-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613'; export declare namespace Chat { - export import ChatModel = ChatAPI.ChatModel; - export import Completions = CompletionsAPI.Completions; - export import ChatCompletion = CompletionsAPI.ChatCompletion; - export import ChatCompletionAssistantMessageParam = CompletionsAPI.ChatCompletionAssistantMessageParam; - export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk; - export import ChatCompletionContentPart = CompletionsAPI.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = CompletionsAPI.ChatCompletionContentPartImage; - export import ChatCompletionContentPartRefusal = CompletionsAPI.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = CompletionsAPI.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = CompletionsAPI.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = CompletionsAPI.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage; - export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = CompletionsAPI.ChatCompletionMessageToolCall; - export import ChatCompletionNamedToolChoice = CompletionsAPI.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole; - export import ChatCompletionStreamOptions = CompletionsAPI.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = CompletionsAPI.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = CompletionsAPI.ChatCompletionTokenLogprob; - export import ChatCompletionTool = CompletionsAPI.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = CompletionsAPI.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = CompletionsAPI.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = CompletionsAPI.ChatCompletionUserMessageParam; - /** - * @deprecated ChatCompletionMessageParam should be used instead - */ - export import CreateChatCompletionRequestMessage = CompletionsAPI.CreateChatCompletionRequestMessage; - export import ChatCompletionCreateParams = CompletionsAPI.ChatCompletionCreateParams; - export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = CompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = CompletionsAPI.ChatCompletionCreateParamsStreaming; - export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + export { type ChatModel as ChatModel }; + export { Completions as Completions, type ChatCompletion as ChatCompletion, type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, type ChatCompletionAudio as ChatCompletionAudio, type ChatCompletionAudioParam as ChatCompletionAudioParam, type ChatCompletionChunk as ChatCompletionChunk, type ChatCompletionContentPart as ChatCompletionContentPart, type ChatCompletionContentPartImage as ChatCompletionContentPartImage, type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, type ChatCompletionContentPartText as ChatCompletionContentPartText, type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, type ChatCompletionMessage as ChatCompletionMessage, type ChatCompletionMessageParam as ChatCompletionMessageParam, type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, type ChatCompletionModality as ChatCompletionModality, type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, type ChatCompletionPredictionContent as ChatCompletionPredictionContent, type ChatCompletionRole as ChatCompletionRole, type ChatCompletionStreamOptions as ChatCompletionStreamOptions, type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, type ChatCompletionTool as ChatCompletionTool, type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage, type ChatCompletionCreateParams as ChatCompletionCreateParams, type CompletionCreateParams as CompletionCreateParams, type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; } //# sourceMappingURL=chat.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/chat/completions.d.ts b/openai-types/resources/chat/completions.d.ts index d9883a0..a89461c 100644 --- a/openai-types/resources/chat/completions.d.ts +++ b/openai-types/resources/chat/completions.d.ts @@ -8,7 +8,10 @@ import * as ChatAPI from "./chat.js"; import { Stream } from "../../streaming.js"; export declare class Completions extends APIResource { /** - * Creates a model response for the given chat conversation. + * Creates a model response for the given chat conversation. Learn more in the + * [text generation](https://platform.openai.com/docs/guides/text-generation), + * [vision](https://platform.openai.com/docs/guides/vision), and + * [audio](https://platform.openai.com/docs/guides/audio) guides. */ create(body: ChatCompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise; create(body: ChatCompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise>; @@ -102,6 +105,11 @@ export interface ChatCompletionAssistantMessageParam { * The role of the messages author, in this case `assistant`. */ role: 'assistant'; + /** + * Data about a previous audio response from the model. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ + audio?: ChatCompletionAssistantMessageParam.Audio | null; /** * The contents of the assistant message. Required unless `tool_calls` or * `function_call` is specified. @@ -127,6 +135,16 @@ export interface ChatCompletionAssistantMessageParam { tool_calls?: Array; } export declare namespace ChatCompletionAssistantMessageParam { + /** + * Data about a previous audio response from the model. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ + interface Audio { + /** + * Unique identifier for a previous audio response from the model. + */ + id: string; + } /** * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of * a function that should be called, as generated by the model. @@ -145,6 +163,48 @@ export declare namespace ChatCompletionAssistantMessageParam { name: string; } } +/** + * If the audio output modality is requested, this object contains data about the + * audio response from the model. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ +export interface ChatCompletionAudio { + /** + * Unique identifier for this audio response. + */ + id: string; + /** + * Base64 encoded audio bytes generated by the model, in the format specified in + * the request. + */ + data: string; + /** + * The Unix timestamp (in seconds) for when this audio response will no longer be + * accessible on the server for use in multi-turn conversations. + */ + expires_at: number; + /** + * Transcript of the audio generated by the model. + */ + transcript: string; +} +/** + * Parameters for audio output. Required when audio output is requested with + * `modalities: ["audio"]`. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ +export interface ChatCompletionAudioParam { + /** + * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, + * or `pcm16`. + */ + format: 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16'; + /** + * The voice the model uses to respond. Supported voices are `alloy`, `ash`, + * `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`. + */ + voice: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse'; +} /** * Represents a streamed chunk of a chat completion response returned by model, * based on the provided input. @@ -190,7 +250,7 @@ export interface ChatCompletionChunk { * contains a null value except for the last chunk which contains the token usage * statistics for the entire request. */ - usage?: CompletionsAPI.CompletionUsage; + usage?: CompletionsAPI.CompletionUsage | null; } export declare namespace ChatCompletionChunk { interface Choice { @@ -301,7 +361,14 @@ export declare namespace ChatCompletionChunk { } } } -export type ChatCompletionContentPart = ChatCompletionContentPartText | ChatCompletionContentPartImage; +/** + * Learn about + * [text inputs](https://platform.openai.com/docs/guides/text-generation). + */ +export type ChatCompletionContentPart = ChatCompletionContentPartText | ChatCompletionContentPartImage | ChatCompletionContentPartInputAudio; +/** + * Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + */ export interface ChatCompletionContentPartImage { image_url: ChatCompletionContentPartImage.ImageURL; /** @@ -317,11 +384,33 @@ export declare namespace ChatCompletionContentPartImage { url: string; /** * Specifies the detail level of the image. Learn more in the - * [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding). + * [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). */ detail?: 'auto' | 'low' | 'high'; } } +/** + * Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + */ +export interface ChatCompletionContentPartInputAudio { + input_audio: ChatCompletionContentPartInputAudio.InputAudio; + /** + * The type of the content part. Always `input_audio`. + */ + type: 'input_audio'; +} +export declare namespace ChatCompletionContentPartInputAudio { + interface InputAudio { + /** + * Base64 encoded audio data. + */ + data: string; + /** + * The format of the encoded audio data. Currently supports "wav" and "mp3". + */ + format: 'wav' | 'mp3'; + } +} export interface ChatCompletionContentPartRefusal { /** * The refusal message generated by the model. @@ -332,6 +421,10 @@ export interface ChatCompletionContentPartRefusal { */ type: 'refusal'; } +/** + * Learn about + * [text inputs](https://platform.openai.com/docs/guides/text-generation). + */ export interface ChatCompletionContentPartText { /** * The text content. @@ -385,6 +478,12 @@ export interface ChatCompletionMessage { * The role of the author of this message. */ role: 'assistant'; + /** + * If the audio output modality is requested, this object contains data about the + * audio response from the model. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ + audio?: ChatCompletionAudio | null; /** * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of * a function that should be called, as generated by the model. @@ -447,6 +546,7 @@ export declare namespace ChatCompletionMessageToolCall { name: string; } } +export type ChatCompletionModality = 'text' | 'audio'; /** * Specifies a tool the model should use. Use to force the model to call a specific * function. @@ -466,6 +566,23 @@ export declare namespace ChatCompletionNamedToolChoice { name: string; } } +/** + * Static predicted output content, such as the content of a text file that is + * being regenerated. + */ +export interface ChatCompletionPredictionContent { + /** + * The content that should be matched when generating a model response. If + * generated tokens would match this content, the entire model response can be + * returned much more quickly. + */ + content: string | Array; + /** + * The type of the predicted content you want to provide. This type is currently + * always `content`. + */ + type: 'content'; +} /** * The role of the author of a message */ @@ -608,16 +725,22 @@ export interface ChatCompletionCreateParamsBase { messages: Array; /** * ID of the model to use. See the - * [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) + * [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) * table for details on which models work with the Chat API. */ model: (string & {}) | ChatAPI.ChatModel; + /** + * Parameters for audio output. Required when audio output is requested with + * `modalities: ["audio"]`. + * [Learn more](https://platform.openai.com/docs/guides/audio). + */ + audio?: ChatCompletionAudioParam | null; /** * Number between -2.0 and 2.0. Positive values penalize new tokens based on their * existing frequency in the text so far, decreasing the model's likelihood to * repeat the same line verbatim. * - * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) */ frequency_penalty?: number | null; /** @@ -674,9 +797,22 @@ export interface ChatCompletionCreateParamsBase { max_tokens?: number | null; /** * Developer-defined tags and values used for filtering completions in the - * [dashboard](https://platform.openai.com/completions). + * [dashboard](https://platform.openai.com/chat-completions). */ metadata?: Record | null; + /** + * Output types that you would like the model to generate for this request. Most + * models are capable of generating text, which is the default: + * + * `["text"]` + * + * The `gpt-4o-audio-preview` model can also be used to + * [generate audio](https://platform.openai.com/docs/guides/audio). To request that + * this model generate both text and audio responses, you can use: + * + * `["text", "audio"]` + */ + modalities?: Array | null; /** * How many chat completion choices to generate for each input message. Note that * you will be charged based on the number of generated tokens across all of the @@ -685,23 +821,28 @@ export interface ChatCompletionCreateParamsBase { n?: number | null; /** * Whether to enable - * [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) * during tool use. */ parallel_tool_calls?: boolean; + /** + * Static predicted output content, such as the content of a text file that is + * being regenerated. + */ + prediction?: ChatCompletionPredictionContent | null; /** * Number between -2.0 and 2.0. Positive values penalize new tokens based on * whether they appear in the text so far, increasing the model's likelihood to * talk about new topics. * - * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) */ presence_penalty?: number | null; /** * An object specifying the format that the model must output. Compatible with - * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), - * [GPT-4o mini](https://platform.openai.com/docs/models/gpt-4o-mini), - * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and + * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), + * [GPT-4o mini](https://platform.openai.com/docs/models#gpt-4o-mini), + * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4) and * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. * * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured @@ -751,8 +892,9 @@ export interface ChatCompletionCreateParamsBase { */ stop?: string | null | Array; /** - * Whether or not to store the output of this completion request for traffic - * logging in the [dashboard](https://platform.openai.com/completions). + * Whether or not to store the output of this chat completion request for use in + * our [model distillation](https://platform.openai.com/docs/guides/distillation) + * or [evals](https://platform.openai.com/docs/guides/evals) products. */ store?: boolean | null; /** @@ -811,7 +953,7 @@ export interface ChatCompletionCreateParamsBase { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } @@ -879,36 +1021,6 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat */ export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming; export declare namespace Completions { - export import ChatCompletion = ChatCompletionsAPI.ChatCompletion; - export import ChatCompletionAssistantMessageParam = ChatCompletionsAPI.ChatCompletionAssistantMessageParam; - export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk; - export import ChatCompletionContentPart = ChatCompletionsAPI.ChatCompletionContentPart; - export import ChatCompletionContentPartImage = ChatCompletionsAPI.ChatCompletionContentPartImage; - export import ChatCompletionContentPartRefusal = ChatCompletionsAPI.ChatCompletionContentPartRefusal; - export import ChatCompletionContentPartText = ChatCompletionsAPI.ChatCompletionContentPartText; - export import ChatCompletionFunctionCallOption = ChatCompletionsAPI.ChatCompletionFunctionCallOption; - export import ChatCompletionFunctionMessageParam = ChatCompletionsAPI.ChatCompletionFunctionMessageParam; - export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage; - export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam; - export import ChatCompletionMessageToolCall = ChatCompletionsAPI.ChatCompletionMessageToolCall; - export import ChatCompletionNamedToolChoice = ChatCompletionsAPI.ChatCompletionNamedToolChoice; - export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole; - export import ChatCompletionStreamOptions = ChatCompletionsAPI.ChatCompletionStreamOptions; - export import ChatCompletionSystemMessageParam = ChatCompletionsAPI.ChatCompletionSystemMessageParam; - export import ChatCompletionTokenLogprob = ChatCompletionsAPI.ChatCompletionTokenLogprob; - export import ChatCompletionTool = ChatCompletionsAPI.ChatCompletionTool; - export import ChatCompletionToolChoiceOption = ChatCompletionsAPI.ChatCompletionToolChoiceOption; - export import ChatCompletionToolMessageParam = ChatCompletionsAPI.ChatCompletionToolMessageParam; - export import ChatCompletionUserMessageParam = ChatCompletionsAPI.ChatCompletionUserMessageParam; - /** - * @deprecated ChatCompletionMessageParam should be used instead - */ - export import CreateChatCompletionRequestMessage = ChatCompletionsAPI.CreateChatCompletionRequestMessage; - export import ChatCompletionCreateParams = ChatCompletionsAPI.ChatCompletionCreateParams; - export import CompletionCreateParams = ChatCompletionsAPI.CompletionCreateParams; - export import ChatCompletionCreateParamsNonStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming; - export import CompletionCreateParamsNonStreaming = ChatCompletionsAPI.CompletionCreateParamsNonStreaming; - export import ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming; - export import CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming; + export { type ChatCompletion as ChatCompletion, type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam, type ChatCompletionAudio as ChatCompletionAudio, type ChatCompletionAudioParam as ChatCompletionAudioParam, type ChatCompletionChunk as ChatCompletionChunk, type ChatCompletionContentPart as ChatCompletionContentPart, type ChatCompletionContentPartImage as ChatCompletionContentPartImage, type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio, type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal, type ChatCompletionContentPartText as ChatCompletionContentPartText, type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption, type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam, type ChatCompletionMessage as ChatCompletionMessage, type ChatCompletionMessageParam as ChatCompletionMessageParam, type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall, type ChatCompletionModality as ChatCompletionModality, type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice, type ChatCompletionPredictionContent as ChatCompletionPredictionContent, type ChatCompletionRole as ChatCompletionRole, type ChatCompletionStreamOptions as ChatCompletionStreamOptions, type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam, type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob, type ChatCompletionTool as ChatCompletionTool, type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption, type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam, type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam, type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage, type ChatCompletionCreateParams as ChatCompletionCreateParams, type CompletionCreateParams as CompletionCreateParams, type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; } //# sourceMappingURL=completions.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/chat/index.d.ts b/openai-types/resources/chat/index.d.ts index 45d151d..be9b6d4 100644 --- a/openai-types/resources/chat/index.d.ts +++ b/openai-types/resources/chat/index.d.ts @@ -1,3 +1,3 @@ -export { ChatCompletion, ChatCompletionAssistantMessageParam, ChatCompletionChunk, ChatCompletionContentPart, ChatCompletionContentPartImage, ChatCompletionContentPartRefusal, ChatCompletionContentPartText, ChatCompletionFunctionCallOption, ChatCompletionFunctionMessageParam, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionNamedToolChoice, ChatCompletionRole, ChatCompletionStreamOptions, ChatCompletionSystemMessageParam, ChatCompletionTokenLogprob, ChatCompletionTool, ChatCompletionToolChoiceOption, ChatCompletionToolMessageParam, ChatCompletionUserMessageParam, CreateChatCompletionRequestMessage, ChatCompletionCreateParams, CompletionCreateParams, ChatCompletionCreateParamsNonStreaming, CompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, CompletionCreateParamsStreaming, Completions, } from "./completions.js"; -export { ChatModel, Chat } from "./chat.js"; +export { Chat, type ChatModel } from "./chat.js"; +export { Completions, type ChatCompletion, type ChatCompletionAssistantMessageParam, type ChatCompletionAudio, type ChatCompletionAudioParam, type ChatCompletionChunk, type ChatCompletionContentPart, type ChatCompletionContentPartImage, type ChatCompletionContentPartInputAudio, type ChatCompletionContentPartRefusal, type ChatCompletionContentPartText, type ChatCompletionFunctionCallOption, type ChatCompletionFunctionMessageParam, type ChatCompletionMessage, type ChatCompletionMessageParam, type ChatCompletionMessageToolCall, type ChatCompletionModality, type ChatCompletionNamedToolChoice, type ChatCompletionPredictionContent, type ChatCompletionRole, type ChatCompletionStreamOptions, type ChatCompletionSystemMessageParam, type ChatCompletionTokenLogprob, type ChatCompletionTool, type ChatCompletionToolChoiceOption, type ChatCompletionToolMessageParam, type ChatCompletionUserMessageParam, type CreateChatCompletionRequestMessage, type ChatCompletionCreateParams, type CompletionCreateParams, type ChatCompletionCreateParamsNonStreaming, type CompletionCreateParamsNonStreaming, type ChatCompletionCreateParamsStreaming, type CompletionCreateParamsStreaming, } from "./completions.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/completions.d.ts b/openai-types/resources/completions.d.ts index aaa896e..a298d95 100644 --- a/openai-types/resources/completions.d.ts +++ b/openai-types/resources/completions.d.ts @@ -99,6 +99,11 @@ export declare namespace CompletionUsage { * Breakdown of tokens used in a completion. */ interface CompletionTokensDetails { + /** + * When using Predicted Outputs, the number of tokens in the prediction that + * appeared in the completion. + */ + accepted_prediction_tokens?: number; /** * Audio input tokens generated by the model. */ @@ -107,6 +112,13 @@ export declare namespace CompletionUsage { * Tokens generated by the model for reasoning. */ reasoning_tokens?: number; + /** + * When using Predicted Outputs, the number of tokens in the prediction that did + * not appear in the completion. However, like reasoning tokens, these tokens are + * still counted in the total completion tokens for purposes of billing, output, + * and context window limits. + */ + rejected_prediction_tokens?: number; } /** * Breakdown of tokens used in the prompt. @@ -128,8 +140,8 @@ export interface CompletionCreateParamsBase { * ID of the model to use. You can use the * [List models](https://platform.openai.com/docs/api-reference/models/list) API to * see all of your available models, or see our - * [Model overview](https://platform.openai.com/docs/models/overview) for - * descriptions of them. + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. */ model: (string & {}) | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002'; /** @@ -162,7 +174,7 @@ export interface CompletionCreateParamsBase { * existing frequency in the text so far, decreasing the model's likelihood to * repeat the same line verbatim. * - * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) */ frequency_penalty?: number | null; /** @@ -212,7 +224,7 @@ export interface CompletionCreateParamsBase { * whether they appear in the text so far, increasing the model's likelihood to * talk about new topics. * - * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) + * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) */ presence_penalty?: number | null; /** @@ -267,7 +279,7 @@ export interface CompletionCreateParamsBase { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } @@ -298,11 +310,6 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB stream: true; } export declare namespace Completions { - export import Completion = CompletionsAPI.Completion; - export import CompletionChoice = CompletionsAPI.CompletionChoice; - export import CompletionUsage = CompletionsAPI.CompletionUsage; - export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams; - export import CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export import CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + export { type Completion as Completion, type CompletionChoice as CompletionChoice, type CompletionUsage as CompletionUsage, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, }; } //# sourceMappingURL=completions.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/embeddings.d.ts b/openai-types/resources/embeddings.d.ts index 4477b30..2452707 100644 --- a/openai-types/resources/embeddings.d.ts +++ b/openai-types/resources/embeddings.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../resource.js"; import * as Core from "../core.js"; -import * as EmbeddingsAPI from "./embeddings.js"; export declare class Embeddings extends APIResource { /** * Creates an embedding vector representing the input text. @@ -75,8 +74,8 @@ export interface EmbeddingCreateParams { * ID of the model to use. You can use the * [List models](https://platform.openai.com/docs/api-reference/models/list) API to * see all of your available models, or see our - * [Model overview](https://platform.openai.com/docs/models/overview) for - * descriptions of them. + * [Model overview](https://platform.openai.com/docs/models) for descriptions of + * them. */ model: (string & {}) | EmbeddingModel; /** @@ -92,14 +91,11 @@ export interface EmbeddingCreateParams { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } export declare namespace Embeddings { - export import CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse; - export import Embedding = EmbeddingsAPI.Embedding; - export import EmbeddingModel = EmbeddingsAPI.EmbeddingModel; - export import EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams; + export { type CreateEmbeddingResponse as CreateEmbeddingResponse, type Embedding as Embedding, type EmbeddingModel as EmbeddingModel, type EmbeddingCreateParams as EmbeddingCreateParams, }; } //# sourceMappingURL=embeddings.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/files.d.ts b/openai-types/resources/files.d.ts index 04b70fb..991fe26 100644 --- a/openai-types/resources/files.d.ts +++ b/openai-types/resources/files.d.ts @@ -1,7 +1,6 @@ import { APIResource } from "../resource.js"; import * as Core from "../core.js"; -import * as FilesAPI from "./files.js"; -import { Page } from "../pagination.js"; +import { CursorPage, type CursorPageParams } from "../pagination.js"; import { type Response } from "../_shims/index.js"; export declare class Files extends APIResource { /** @@ -33,7 +32,7 @@ export declare class Files extends APIResource { */ retrieve(fileId: string, options?: Core.RequestOptions): Core.APIPromise; /** - * Returns a list of files that belong to the user's organization. + * Returns a list of files. */ list(query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; @@ -59,10 +58,7 @@ export declare class Files extends APIResource { maxWait?: number; }): Promise; } -/** - * Note: no pagination actually occurs yet, this is for forwards-compatibility. - */ -export declare class FileObjectsPage extends Page { +export declare class FileObjectsPage extends CursorPage { } export type FileContent = string; export interface FileDeleted { @@ -139,19 +135,18 @@ export interface FileCreateParams { */ purpose: FilePurpose; } -export interface FileListParams { +export interface FileListParams extends CursorPageParams { + /** + * Sort order by the `created_at` timestamp of the objects. `asc` for ascending + * order and `desc` for descending order. + */ + order?: 'asc' | 'desc'; /** * Only return files with the given purpose. */ purpose?: string; } export declare namespace Files { - export import FileContent = FilesAPI.FileContent; - export import FileDeleted = FilesAPI.FileDeleted; - export import FileObject = FilesAPI.FileObject; - export import FilePurpose = FilesAPI.FilePurpose; - export import FileObjectsPage = FilesAPI.FileObjectsPage; - export import FileCreateParams = FilesAPI.FileCreateParams; - export import FileListParams = FilesAPI.FileListParams; + export { type FileContent as FileContent, type FileDeleted as FileDeleted, type FileObject as FileObject, type FilePurpose as FilePurpose, FileObjectsPage as FileObjectsPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, }; } //# sourceMappingURL=files.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/fine-tuning/fine-tuning.d.ts b/openai-types/resources/fine-tuning/fine-tuning.d.ts index 26aaa40..f3e2637 100644 --- a/openai-types/resources/fine-tuning/fine-tuning.d.ts +++ b/openai-types/resources/fine-tuning/fine-tuning.d.ts @@ -1,19 +1,10 @@ import { APIResource } from "../../resource.js"; import * as JobsAPI from "./jobs/jobs.js"; +import { FineTuningJob, FineTuningJobEvent, FineTuningJobEventsPage, FineTuningJobIntegration, FineTuningJobWandbIntegration, FineTuningJobWandbIntegrationObject, FineTuningJobsPage, JobCreateParams, JobListEventsParams, JobListParams, Jobs } from "./jobs/jobs.js"; export declare class FineTuning extends APIResource { jobs: JobsAPI.Jobs; } export declare namespace FineTuning { - export import Jobs = JobsAPI.Jobs; - export import FineTuningJob = JobsAPI.FineTuningJob; - export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; - export import FineTuningJobIntegration = JobsAPI.FineTuningJobIntegration; - export import FineTuningJobWandbIntegration = JobsAPI.FineTuningJobWandbIntegration; - export import FineTuningJobWandbIntegrationObject = JobsAPI.FineTuningJobWandbIntegrationObject; - export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; - export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export import JobCreateParams = JobsAPI.JobCreateParams; - export import JobListParams = JobsAPI.JobListParams; - export import JobListEventsParams = JobsAPI.JobListEventsParams; + export { Jobs as Jobs, type FineTuningJob as FineTuningJob, type FineTuningJobEvent as FineTuningJobEvent, type FineTuningJobIntegration as FineTuningJobIntegration, type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject, FineTuningJobsPage as FineTuningJobsPage, FineTuningJobEventsPage as FineTuningJobEventsPage, type JobCreateParams as JobCreateParams, type JobListParams as JobListParams, type JobListEventsParams as JobListEventsParams, }; } //# sourceMappingURL=fine-tuning.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/fine-tuning/index.d.ts b/openai-types/resources/fine-tuning/index.d.ts index 9888cc4..0f05126 100644 --- a/openai-types/resources/fine-tuning/index.d.ts +++ b/openai-types/resources/fine-tuning/index.d.ts @@ -1,3 +1,3 @@ export { FineTuning } from "./fine-tuning.js"; -export { FineTuningJob, FineTuningJobEvent, FineTuningJobIntegration, FineTuningJobWandbIntegration, FineTuningJobWandbIntegrationObject, JobCreateParams, JobListParams, JobListEventsParams, FineTuningJobsPage, FineTuningJobEventsPage, Jobs, } from "./jobs/index.js"; +export { FineTuningJobsPage, FineTuningJobEventsPage, Jobs, type FineTuningJob, type FineTuningJobEvent, type FineTuningJobIntegration, type FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject, type JobCreateParams, type JobListParams, type JobListEventsParams, } from "./jobs/index.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/fine-tuning/jobs/checkpoints.d.ts b/openai-types/resources/fine-tuning/jobs/checkpoints.d.ts index 3eb8946..241d2ff 100644 --- a/openai-types/resources/fine-tuning/jobs/checkpoints.d.ts +++ b/openai-types/resources/fine-tuning/jobs/checkpoints.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; -import * as CheckpointsAPI from "./checkpoints.js"; import { CursorPage, type CursorPageParams } from "../../../pagination.js"; export declare class Checkpoints extends APIResource { /** @@ -62,8 +61,6 @@ export declare namespace FineTuningJobCheckpoint { export interface CheckpointListParams extends CursorPageParams { } export declare namespace Checkpoints { - export import FineTuningJobCheckpoint = CheckpointsAPI.FineTuningJobCheckpoint; - export import FineTuningJobCheckpointsPage = CheckpointsAPI.FineTuningJobCheckpointsPage; - export import CheckpointListParams = CheckpointsAPI.CheckpointListParams; + export { type FineTuningJobCheckpoint as FineTuningJobCheckpoint, FineTuningJobCheckpointsPage as FineTuningJobCheckpointsPage, type CheckpointListParams as CheckpointListParams, }; } //# sourceMappingURL=checkpoints.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/fine-tuning/jobs/index.d.ts b/openai-types/resources/fine-tuning/jobs/index.d.ts index d42796a..c47d0e2 100644 --- a/openai-types/resources/fine-tuning/jobs/index.d.ts +++ b/openai-types/resources/fine-tuning/jobs/index.d.ts @@ -1,3 +1,3 @@ -export { FineTuningJob, FineTuningJobEvent, FineTuningJobIntegration, FineTuningJobWandbIntegration, FineTuningJobWandbIntegrationObject, JobCreateParams, JobListParams, JobListEventsParams, FineTuningJobsPage, FineTuningJobEventsPage, Jobs, } from "./jobs.js"; -export { FineTuningJobCheckpoint, CheckpointListParams, FineTuningJobCheckpointsPage, Checkpoints, } from "./checkpoints.js"; +export { FineTuningJobCheckpointsPage, Checkpoints, type FineTuningJobCheckpoint, type CheckpointListParams, } from "./checkpoints.js"; +export { FineTuningJobsPage, FineTuningJobEventsPage, Jobs, type FineTuningJob, type FineTuningJobEvent, type FineTuningJobIntegration, type FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject, type JobCreateParams, type JobListParams, type JobListEventsParams, } from "./jobs.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/fine-tuning/jobs/jobs.d.ts b/openai-types/resources/fine-tuning/jobs/jobs.d.ts index c65e3fb..6c9d874 100644 --- a/openai-types/resources/fine-tuning/jobs/jobs.d.ts +++ b/openai-types/resources/fine-tuning/jobs/jobs.d.ts @@ -1,7 +1,7 @@ import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; -import * as JobsAPI from "./jobs.js"; import * as CheckpointsAPI from "./checkpoints.js"; +import { CheckpointListParams, Checkpoints, FineTuningJobCheckpoint, FineTuningJobCheckpointsPage } from "./checkpoints.js"; import { CursorPage, type CursorPageParams } from "../../../pagination.js"; export declare class Jobs extends APIResource { checkpoints: CheckpointsAPI.Checkpoints; @@ -218,7 +218,7 @@ export interface FineTuningJobWandbIntegrationObject { export interface JobCreateParams { /** * The name of the model to fine-tune. You can select one of the - * [supported models](https://platform.openai.com/docs/guides/fine-tuning/which-models-can-be-fine-tuned). + * [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). */ model: (string & {}) | 'babbage-002' | 'davinci-002' | 'gpt-3.5-turbo' | 'gpt-4o-mini'; /** @@ -349,19 +349,7 @@ export interface JobListParams extends CursorPageParams { export interface JobListEventsParams extends CursorPageParams { } export declare namespace Jobs { - export import FineTuningJob = JobsAPI.FineTuningJob; - export import FineTuningJobEvent = JobsAPI.FineTuningJobEvent; - export import FineTuningJobIntegration = JobsAPI.FineTuningJobIntegration; - export import FineTuningJobWandbIntegration = JobsAPI.FineTuningJobWandbIntegration; - export import FineTuningJobWandbIntegrationObject = JobsAPI.FineTuningJobWandbIntegrationObject; - export import FineTuningJobsPage = JobsAPI.FineTuningJobsPage; - export import FineTuningJobEventsPage = JobsAPI.FineTuningJobEventsPage; - export import JobCreateParams = JobsAPI.JobCreateParams; - export import JobListParams = JobsAPI.JobListParams; - export import JobListEventsParams = JobsAPI.JobListEventsParams; - export import Checkpoints = CheckpointsAPI.Checkpoints; - export import FineTuningJobCheckpoint = CheckpointsAPI.FineTuningJobCheckpoint; - export import FineTuningJobCheckpointsPage = CheckpointsAPI.FineTuningJobCheckpointsPage; - export import CheckpointListParams = CheckpointsAPI.CheckpointListParams; + export { type FineTuningJob as FineTuningJob, type FineTuningJobEvent as FineTuningJobEvent, type FineTuningJobIntegration as FineTuningJobIntegration, type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject, FineTuningJobsPage as FineTuningJobsPage, FineTuningJobEventsPage as FineTuningJobEventsPage, type JobCreateParams as JobCreateParams, type JobListParams as JobListParams, type JobListEventsParams as JobListEventsParams, }; + export { Checkpoints as Checkpoints, type FineTuningJobCheckpoint as FineTuningJobCheckpoint, FineTuningJobCheckpointsPage as FineTuningJobCheckpointsPage, type CheckpointListParams as CheckpointListParams, }; } //# sourceMappingURL=jobs.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/images.d.ts b/openai-types/resources/images.d.ts index 8cb575e..3258f0b 100644 --- a/openai-types/resources/images.d.ts +++ b/openai-types/resources/images.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../resource.js"; import * as Core from "../core.js"; -import * as ImagesAPI from "./images.js"; export declare class Images extends APIResource { /** * Creates a variation of a given image. @@ -69,7 +68,7 @@ export interface ImageCreateVariationParams { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } @@ -113,7 +112,7 @@ export interface ImageEditParams { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } @@ -160,16 +159,11 @@ export interface ImageGenerateParams { /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. - * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } export declare namespace Images { - export import Image = ImagesAPI.Image; - export import ImageModel = ImagesAPI.ImageModel; - export import ImagesResponse = ImagesAPI.ImagesResponse; - export import ImageCreateVariationParams = ImagesAPI.ImageCreateVariationParams; - export import ImageEditParams = ImagesAPI.ImageEditParams; - export import ImageGenerateParams = ImagesAPI.ImageGenerateParams; + export { type Image as Image, type ImageModel as ImageModel, type ImagesResponse as ImagesResponse, type ImageCreateVariationParams as ImageCreateVariationParams, type ImageEditParams as ImageEditParams, type ImageGenerateParams as ImageGenerateParams, }; } //# sourceMappingURL=images.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/index.d.ts b/openai-types/resources/index.d.ts index 839d734..e7a9683 100644 --- a/openai-types/resources/index.d.ts +++ b/openai-types/resources/index.d.ts @@ -1,14 +1,14 @@ export * from "./chat/index.js"; export * from "./shared.js"; -export { AudioModel, AudioResponseFormat, Audio } from "./audio/audio.js"; -export { Batch, BatchError, BatchRequestCounts, BatchCreateParams, BatchListParams, BatchesPage, Batches, } from "./batches.js"; +export { Audio, type AudioModel, type AudioResponseFormat } from "./audio/audio.js"; +export { BatchesPage, Batches, type Batch, type BatchError, type BatchRequestCounts, type BatchCreateParams, type BatchListParams, } from "./batches.js"; export { Beta } from "./beta/beta.js"; -export { Completion, CompletionChoice, CompletionUsage, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, } from "./completions.js"; -export { CreateEmbeddingResponse, Embedding, EmbeddingModel, EmbeddingCreateParams, Embeddings, } from "./embeddings.js"; -export { FileContent, FileDeleted, FileObject, FilePurpose, FileCreateParams, FileListParams, FileObjectsPage, Files, } from "./files.js"; +export { Completions, type Completion, type CompletionChoice, type CompletionUsage, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming, } from "./completions.js"; +export { Embeddings, type CreateEmbeddingResponse, type Embedding, type EmbeddingModel, type EmbeddingCreateParams, } from "./embeddings.js"; +export { FileObjectsPage, Files, type FileContent, type FileDeleted, type FileObject, type FilePurpose, type FileCreateParams, type FileListParams, } from "./files.js"; export { FineTuning } from "./fine-tuning/fine-tuning.js"; -export { Image, ImageModel, ImagesResponse, ImageCreateVariationParams, ImageEditParams, ImageGenerateParams, Images, } from "./images.js"; -export { Model, ModelDeleted, ModelsPage, Models } from "./models.js"; -export { Moderation, ModerationImageURLInput, ModerationModel, ModerationMultiModalInput, ModerationTextInput, ModerationCreateResponse, ModerationCreateParams, Moderations, } from "./moderations.js"; -export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from "./uploads/uploads.js"; +export { Images, type Image, type ImageModel, type ImagesResponse, type ImageCreateVariationParams, type ImageEditParams, type ImageGenerateParams, } from "./images.js"; +export { ModelsPage, Models, type Model, type ModelDeleted } from "./models.js"; +export { Moderations, type Moderation, type ModerationImageURLInput, type ModerationModel, type ModerationMultiModalInput, type ModerationTextInput, type ModerationCreateResponse, type ModerationCreateParams, } from "./moderations.js"; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads/uploads.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/models.d.ts b/openai-types/resources/models.d.ts index 5a9da03..4ac2bd0 100644 --- a/openai-types/resources/models.d.ts +++ b/openai-types/resources/models.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../resource.js"; import * as Core from "../core.js"; -import * as ModelsAPI from "./models.js"; import { Page } from "../pagination.js"; export declare class Models extends APIResource { /** @@ -51,8 +50,6 @@ export interface ModelDeleted { object: string; } export declare namespace Models { - export import Model = ModelsAPI.Model; - export import ModelDeleted = ModelsAPI.ModelDeleted; - export import ModelsPage = ModelsAPI.ModelsPage; + export { type Model as Model, type ModelDeleted as ModelDeleted, ModelsPage as ModelsPage }; } //# sourceMappingURL=models.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/moderations.d.ts b/openai-types/resources/moderations.d.ts index 1b88d1f..58fedca 100644 --- a/openai-types/resources/moderations.d.ts +++ b/openai-types/resources/moderations.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../resource.js"; import * as Core from "../core.js"; -import * as ModerationsAPI from "./moderations.js"; export declare class Moderations extends APIResource { /** * Classifies if text and/or image inputs are potentially harmful. Learn more in @@ -285,17 +284,11 @@ export interface ModerationCreateParams { * The content moderation model you would like to use. Learn more in * [the moderation guide](https://platform.openai.com/docs/guides/moderation), and * learn about available models - * [here](https://platform.openai.com/docs/models/moderation). + * [here](https://platform.openai.com/docs/models#moderation). */ model?: (string & {}) | ModerationModel; } export declare namespace Moderations { - export import Moderation = ModerationsAPI.Moderation; - export import ModerationImageURLInput = ModerationsAPI.ModerationImageURLInput; - export import ModerationModel = ModerationsAPI.ModerationModel; - export import ModerationMultiModalInput = ModerationsAPI.ModerationMultiModalInput; - export import ModerationTextInput = ModerationsAPI.ModerationTextInput; - export import ModerationCreateResponse = ModerationsAPI.ModerationCreateResponse; - export import ModerationCreateParams = ModerationsAPI.ModerationCreateParams; + export { type Moderation as Moderation, type ModerationImageURLInput as ModerationImageURLInput, type ModerationModel as ModerationModel, type ModerationMultiModalInput as ModerationMultiModalInput, type ModerationTextInput as ModerationTextInput, type ModerationCreateResponse as ModerationCreateResponse, type ModerationCreateParams as ModerationCreateParams, }; } //# sourceMappingURL=moderations.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/uploads/index.d.ts b/openai-types/resources/uploads/index.d.ts index afe9b20..745ba63 100644 --- a/openai-types/resources/uploads/index.d.ts +++ b/openai-types/resources/uploads/index.d.ts @@ -1,3 +1,3 @@ -export { Upload, UploadCreateParams, UploadCompleteParams, Uploads } from "./uploads.js"; -export { UploadPart, PartCreateParams, Parts } from "./parts.js"; +export { Parts, type UploadPart, type PartCreateParams } from "./parts.js"; +export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from "./uploads.js"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/uploads/parts.d.ts b/openai-types/resources/uploads/parts.d.ts index 4034a87..15fabf3 100644 --- a/openai-types/resources/uploads/parts.d.ts +++ b/openai-types/resources/uploads/parts.d.ts @@ -1,6 +1,5 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as PartsAPI from "./parts.js"; export declare class Parts extends APIResource { /** * Adds a @@ -45,7 +44,6 @@ export interface PartCreateParams { data: Core.Uploadable; } export declare namespace Parts { - export import UploadPart = PartsAPI.UploadPart; - export import PartCreateParams = PartsAPI.PartCreateParams; + export { type UploadPart as UploadPart, type PartCreateParams as PartCreateParams }; } //# sourceMappingURL=parts.d.ts.map \ No newline at end of file diff --git a/openai-types/resources/uploads/uploads.d.ts b/openai-types/resources/uploads/uploads.d.ts index 91b5840..0c7967a 100644 --- a/openai-types/resources/uploads/uploads.d.ts +++ b/openai-types/resources/uploads/uploads.d.ts @@ -1,8 +1,8 @@ import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; -import * as UploadsAPI from "./uploads.js"; import * as FilesAPI from "../files.js"; import * as PartsAPI from "./parts.js"; +import { PartCreateParams, Parts, UploadPart } from "./parts.js"; export declare class Uploads extends APIResource { parts: PartsAPI.Parts; /** @@ -21,7 +21,7 @@ export declare class Uploads extends APIResource { * For certain `purpose`s, the correct `mime_type` must be specified. Please refer * to documentation for the supported MIME types for your use case: * - * - [Assistants](https://platform.openai.com/docs/assistants/tools/file-search/supported-files) + * - [Assistants](https://platform.openai.com/docs/assistants/tools/file-search#supported-files) * * For guidance on the proper filename extensions for each purpose, please follow * the documentation on @@ -128,11 +128,7 @@ export interface UploadCompleteParams { md5?: string; } export declare namespace Uploads { - export import Upload = UploadsAPI.Upload; - export import UploadCreateParams = UploadsAPI.UploadCreateParams; - export import UploadCompleteParams = UploadsAPI.UploadCompleteParams; - export import Parts = PartsAPI.Parts; - export import UploadPart = PartsAPI.UploadPart; - export import PartCreateParams = PartsAPI.PartCreateParams; + export { type Upload as Upload, type UploadCreateParams as UploadCreateParams, type UploadCompleteParams as UploadCompleteParams, }; + export { Parts as Parts, type UploadPart as UploadPart, type PartCreateParams as PartCreateParams }; } //# sourceMappingURL=uploads.d.ts.map \ No newline at end of file diff --git a/openai-types/version.d.ts b/openai-types/version.d.ts index 23c148a..d1a3025 100644 --- a/openai-types/version.d.ts +++ b/openai-types/version.d.ts @@ -1,2 +1,2 @@ -export declare const VERSION = "4.67.1"; +export declare const VERSION = "4.71.1"; //# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/package.json b/package.json index fba532b..c04703a 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@dexaai/eslint-config": "^1.3.6", "eslint": "^8.57.0", "np": "^10.0.7", - "openai": "^4.67.1", + "openai": "^4.71.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "typescript": "^5.6.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af36e64..ac0d4b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ importers: specifier: ^10.0.7 version: 10.0.7(typescript@5.6.3) openai: - specifier: ^4.67.1 - version: 4.67.1 + specifier: ^4.71.1 + version: 4.71.1 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -158,8 +158,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@18.19.54': - resolution: {integrity: sha512-+BRgt0G5gYjTvdLac9sIeE0iZcJxi4Jc4PV5EUzqi+88jmQLr+fRZdv2tCTV7IHKSGxM6SaLoOXQWWUiLUItMw==} + '@types/node@18.19.64': + resolution: {integrity: sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -907,8 +907,8 @@ packages: form-data-encoder@1.7.2: resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} formdata-node@4.4.1: @@ -1627,8 +1627,8 @@ packages: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} - openai@4.67.1: - resolution: {integrity: sha512-2YbRFy6qaYRJabK2zLMn4txrB2xBy0KP5g/eoqeSPTT31mIJMnkT75toagvfE555IKa2RdrzJrZwdDsUipsAMw==} + openai@4.71.1: + resolution: {integrity: sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==} hasBin: true peerDependencies: zod: ^3.23.8 @@ -2422,10 +2422,10 @@ snapshots: '@types/node-fetch@2.6.11': dependencies: - '@types/node': 18.19.54 - form-data: 4.0.0 + '@types/node': 18.19.64 + form-data: 4.0.1 - '@types/node@18.19.54': + '@types/node@18.19.64': dependencies: undici-types: 5.26.5 @@ -3367,7 +3367,7 @@ snapshots: form-data-encoder@1.7.2: {} - form-data@4.0.0: + form-data@4.0.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -4123,9 +4123,9 @@ snapshots: is-inside-container: 1.0.0 is-wsl: 3.1.0 - openai@4.67.1: + openai@4.71.1: dependencies: - '@types/node': 18.19.54 + '@types/node': 18.19.64 '@types/node-fetch': 2.6.11 abort-controller: 3.0.0 agentkeepalive: 4.5.0