Hierarchy

  • APIResource
    • FileBatches

Constructors

  • Parameters

    • client: OpenAI

    Returns FileBatches

Methods

  • Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.

    Parameters

    • vectorStoreId: string
    • batchId: string
    • Optionaloptions: RequestOptions<unknown>

    Returns APIPromise<VectorStoreFileBatch>

  • Create a vector store batch and poll until all files have been processed.

    Parameters

    Returns Promise<VectorStoreFileBatch>

  • Wait for the given file batch to be processed.

    Note: this will return even if one of the files failed to process, you need to check batch.file_counts.failed_count to handle this case.

    Parameters

    • vectorStoreId: string
    • batchId: string
    • Optionaloptions: RequestOptions<unknown> & {
          pollIntervalMs?: number;
      }

    Returns Promise<VectorStoreFileBatch>

  • Retrieves a vector store file batch.

    Parameters

    • vectorStoreId: string
    • batchId: string
    • Optionaloptions: RequestOptions<unknown>

    Returns APIPromise<VectorStoreFileBatch>

  • Uploads the given files concurrently and then creates a vector store file batch.

    The concurrency limit is configurable using the maxConcurrency parameter.

    Parameters

    • vectorStoreId: string
    • __namedParameters: {
          fileIds?: string[];
          files: Uploadable[];
      }
      • OptionalfileIds?: string[]
      • files: Uploadable[]
    • Optionaloptions: RequestOptions<unknown> & {
          maxConcurrency?: number;
          pollIntervalMs?: number;
      }

    Returns Promise<VectorStoreFileBatch>