Types:
ErrorObject
FunctionDefinition
FunctionParameters
ResponseFormatJSONObject
ResponseFormatJSONSchema
ResponseFormatText
Types:
Methods:
client.completions.create({ ...params }) -> Completion
Types:
Types:
ChatCompletion
ChatCompletionAssistantMessageParam
ChatCompletionChunk
ChatCompletionContentPart
ChatCompletionContentPartImage
ChatCompletionContentPartRefusal
ChatCompletionContentPartText
ChatCompletionFunctionCallOption
ChatCompletionFunctionMessageParam
ChatCompletionMessage
ChatCompletionMessageParam
ChatCompletionMessageToolCall
ChatCompletionNamedToolChoice
ChatCompletionRole
ChatCompletionStreamOptions
ChatCompletionSystemMessageParam
ChatCompletionTokenLogprob
ChatCompletionTool
ChatCompletionToolChoiceOption
ChatCompletionToolMessageParam
ChatCompletionUserMessageParam
CreateChatCompletionRequestMessage
Methods:
client.chat.completions.create({ ...params }) -> ChatCompletion
Types:
Methods:
client.embeddings.create({ ...params }) -> CreateEmbeddingResponse
Types:
Methods:
client.files.create({ ...params }) -> FileObject
client.files.retrieve(fileId) -> FileObject
client.files.list({ ...params }) -> FileObjectsPage
client.files.del(fileId) -> FileDeleted
client.files.content(fileId) -> Response
client.files.retrieveContent(fileId) -> string
client.files.waitForProcessing(id, { pollInterval = 5000, maxWait = 30 _ 60 _ 1000 }) -> Promise<FileObject>
Types:
Methods:
client.images.createVariation({ ...params }) -> ImagesResponse
client.images.edit({ ...params }) -> ImagesResponse
client.images.generate({ ...params }) -> ImagesResponse
Types:
Types:
Methods:
client.audio.transcriptions.create({ ...params }) -> Transcription
Types:
Methods:
client.audio.translations.create({ ...params }) -> Translation
Types:
Methods:
client.audio.speech.create({ ...params }) -> Response
Types:
Methods:
client.moderations.create({ ...params }) -> ModerationCreateResponse
Types:
Methods:
client.models.retrieve(model) -> Model
client.models.list() -> ModelsPage
client.models.del(model) -> ModelDeleted
Types:
FineTuningJob
FineTuningJobEvent
FineTuningJobIntegration
FineTuningJobWandbIntegration
FineTuningJobWandbIntegrationObject
Methods:
client.fineTuning.jobs.create({ ...params }) -> FineTuningJob
client.fineTuning.jobs.retrieve(fineTuningJobId) -> FineTuningJob
client.fineTuning.jobs.list({ ...params }) -> FineTuningJobsPage
client.fineTuning.jobs.cancel(fineTuningJobId) -> FineTuningJob
client.fineTuning.jobs.listEvents(fineTuningJobId, { ...params }) -> FineTuningJobEventsPage
Types:
Methods:
client.fineTuning.jobs.checkpoints.list(fineTuningJobId, { ...params }) -> FineTuningJobCheckpointsPage
Types:
AutoFileChunkingStrategyParam
FileChunkingStrategy
FileChunkingStrategyParam
OtherFileChunkingStrategyObject
StaticFileChunkingStrategy
StaticFileChunkingStrategyObject
StaticFileChunkingStrategyParam
VectorStore
VectorStoreDeleted
Methods:
client.beta.vectorStores.create({ ...params }) -> VectorStore
client.beta.vectorStores.retrieve(vectorStoreId) -> VectorStore
client.beta.vectorStores.update(vectorStoreId, { ...params }) -> VectorStore
client.beta.vectorStores.list({ ...params }) -> VectorStoresPage
client.beta.vectorStores.del(vectorStoreId) -> VectorStoreDeleted
Types:
Methods:
client.beta.vectorStores.files.create(vectorStoreId, { ...params }) -> VectorStoreFile
client.beta.vectorStores.files.retrieve(vectorStoreId, fileId) -> VectorStoreFile
client.beta.vectorStores.files.list(vectorStoreId, { ...params }) -> VectorStoreFilesPage
client.beta.vectorStores.files.del(vectorStoreId, fileId) -> VectorStoreFileDeleted
client.beta.vectorStores.files.createAndPoll(vectorStoreId, body, options?) -> Promise<VectorStoreFile>
client.beta.vectorStores.files.poll(vectorStoreId, fileId, options?) -> Promise<VectorStoreFile>
client.beta.vectorStores.files.upload(vectorStoreId, file, options?) -> Promise<VectorStoreFile>
client.beta.vectorStores.files.uploadAndPoll(vectorStoreId, file, options?) -> Promise<VectorStoreFile>
Types:
Methods:
client.beta.vectorStores.fileBatches.create(vectorStoreId, { ...params }) -> VectorStoreFileBatch
client.beta.vectorStores.fileBatches.retrieve(vectorStoreId, batchId) -> VectorStoreFileBatch
client.beta.vectorStores.fileBatches.cancel(vectorStoreId, batchId) -> VectorStoreFileBatch
client.beta.vectorStores.fileBatches.listFiles(vectorStoreId, batchId, { ...params }) -> VectorStoreFilesPage
client.beta.vectorStores.fileBatches.createAndPoll(vectorStoreId, body, options?) -> Promise<VectorStoreFileBatch>
client.beta.vectorStores.fileBatches.poll(vectorStoreId, batchId, options?) -> Promise<VectorStoreFileBatch>
client.beta.vectorStores.fileBatches.uploadAndPoll(vectorStoreId, { files, fileIds = [] }, options?) -> Promise<VectorStoreFileBatch>
Methods:
client.beta.chat.completions.runFunctions(body, options?) -> ChatCompletionRunner | ChatCompletionStreamingRunner
client.beta.chat.completions.runTools(body, options?) -> ChatCompletionRunner | ChatCompletionStreamingRunner
client.beta.chat.completions.stream(body, options?) -> ChatCompletionStream
Types:
Assistant
AssistantDeleted
AssistantStreamEvent
AssistantTool
CodeInterpreterTool
FileSearchTool
FunctionTool
MessageStreamEvent
RunStepStreamEvent
RunStreamEvent
ThreadStreamEvent
Methods:
client.beta.assistants.create({ ...params }) -> Assistant
client.beta.assistants.retrieve(assistantId) -> Assistant
client.beta.assistants.update(assistantId, { ...params }) -> Assistant
client.beta.assistants.list({ ...params }) -> AssistantsPage
client.beta.assistants.del(assistantId) -> AssistantDeleted
Types:
AssistantResponseFormatOption
AssistantToolChoice
AssistantToolChoiceFunction
AssistantToolChoiceOption
Thread
ThreadDeleted
Methods:
client.beta.threads.create({ ...params }) -> Thread
client.beta.threads.retrieve(threadId) -> Thread
client.beta.threads.update(threadId, { ...params }) -> Thread
client.beta.threads.del(threadId) -> ThreadDeleted
client.beta.threads.createAndRun({ ...params }) -> Run
client.beta.threads.createAndRunPoll(body, options?) -> Promise<Threads.Run>
client.beta.threads.createAndRunStream(body, options?) -> AssistantStream
Types:
Methods:
client.beta.threads.runs.create(threadId, { ...params }) -> Run
client.beta.threads.runs.retrieve(threadId, runId) -> Run
client.beta.threads.runs.update(threadId, runId, { ...params }) -> Run
client.beta.threads.runs.list(threadId, { ...params }) -> RunsPage
client.beta.threads.runs.cancel(threadId, runId) -> Run
client.beta.threads.runs.submitToolOutputs(threadId, runId, { ...params }) -> Run
client.beta.threads.runs.createAndPoll(threadId, body, options?) -> Promise<Run>
client.beta.threads.runs.createAndStream(threadId, body, options?) -> AssistantStream
client.beta.threads.runs.poll(threadId, runId, options?) -> Promise<Run>
client.beta.threads.runs.stream(threadId, body, options?) -> AssistantStream
client.beta.threads.runs.submitToolOutputsAndPoll(threadId, runId, body, options?) -> Promise<Run>
client.beta.threads.runs.submitToolOutputsStream(threadId, runId, body, options?) -> AssistantStream
Types:
CodeInterpreterLogs
CodeInterpreterOutputImage
CodeInterpreterToolCall
CodeInterpreterToolCallDelta
FileSearchToolCall
FileSearchToolCallDelta
FunctionToolCall
FunctionToolCallDelta
MessageCreationStepDetails
RunStep
RunStepDelta
RunStepDeltaEvent
RunStepDeltaMessageDelta
RunStepInclude
ToolCall
ToolCallDelta
ToolCallDeltaObject
ToolCallsStepDetails
Methods:
client.beta.threads.runs.steps.retrieve(threadId, runId, stepId, { ...params }) -> RunStep
client.beta.threads.runs.steps.list(threadId, runId, { ...params }) -> RunStepsPage
Types:
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
Methods:
client.beta.threads.messages.create(threadId, { ...params }) -> Message
client.beta.threads.messages.retrieve(threadId, messageId) -> Message
client.beta.threads.messages.update(threadId, messageId, { ...params }) -> Message
client.beta.threads.messages.list(threadId, { ...params }) -> MessagesPage
client.beta.threads.messages.del(threadId, messageId) -> MessageDeleted
Types:
Methods:
client.batches.create({ ...params }) -> Batch
client.batches.retrieve(batchId) -> Batch
client.batches.list({ ...params }) -> BatchesPage
client.batches.cancel(batchId) -> Batch
Types:
Methods:
client.uploads.create({ ...params }) -> Upload
client.uploads.cancel(uploadId) -> Upload
client.uploads.complete(uploadId, { ...params }) -> Upload
Types:
Methods:
client.uploads.parts.create(uploadId, { ...params }) -> UploadPart