Skip to content

Latest commit

 

History

History
454 lines (325 loc) · 28.9 KB

api.md

File metadata and controls

454 lines (325 loc) · 28.9 KB

Shared

Types:

Completions

Types:

Methods:

  • client.completions.create({ ...params }) -> Completion

Chat

Types:

Completions

Types:

Methods:

  • client.chat.completions.create({ ...params }) -> ChatCompletion

Embeddings

Types:

Methods:

  • client.embeddings.create({ ...params }) -> CreateEmbeddingResponse

Files

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>

Images

Types:

Methods:

  • client.images.createVariation({ ...params }) -> ImagesResponse
  • client.images.edit({ ...params }) -> ImagesResponse
  • client.images.generate({ ...params }) -> ImagesResponse

Audio

Types:

Transcriptions

Types:

Methods:

  • client.audio.transcriptions.create({ ...params }) -> TranscriptionCreateResponse

Translations

Types:

Methods:

  • client.audio.translations.create({ ...params }) -> TranslationCreateResponse

Speech

Types:

Methods:

  • client.audio.speech.create({ ...params }) -> Response

Moderations

Types:

Methods:

  • client.moderations.create({ ...params }) -> ModerationCreateResponse

Models

Types:

Methods:

  • client.models.retrieve(model) -> Model
  • client.models.list() -> ModelsPage
  • client.models.del(model) -> ModelDeleted

FineTuning

Jobs

Types:

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

Checkpoints

Types:

Methods:

  • client.fineTuning.jobs.checkpoints.list(fineTuningJobId, { ...params }) -> FineTuningJobCheckpointsPage

Beta

VectorStores

Types:

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

Files

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>

FileBatches

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>

Chat

Completions

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

Assistants

Types:

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

Threads

Types:

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

Runs

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

Steps

Types:

Methods:

  • client.beta.threads.runs.steps.retrieve(threadId, runId, stepId, { ...params }) -> RunStep
  • client.beta.threads.runs.steps.list(threadId, runId, { ...params }) -> RunStepsPage

Messages

Types:

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

Batches

Types:

Methods:

  • client.batches.create({ ...params }) -> Batch
  • client.batches.retrieve(batchId) -> Batch
  • client.batches.list({ ...params }) -> BatchesPage
  • client.batches.cancel(batchId) -> Batch

Uploads

Types:

Methods:

  • client.uploads.create({ ...params }) -> Upload
  • client.uploads.cancel(uploadId) -> Upload
  • client.uploads.complete(uploadId, { ...params }) -> Upload

Parts

Types:

Methods:

  • client.uploads.parts.create(uploadId, { ...params }) -> UploadPart