Hierarchy

  • APIResource
    • Files

Constructors

Methods

  • Attach a file to the given vector store and wait for it to be processed.

    Parameters

    Returns Promise<VectorStoreFile>

  • Wait for the vector store file to finish processing.

    Note: this will return even if the file failed to process, you need to check file.last_error and file.status to handle these cases

    Parameters

    • vectorStoreID: string
    • fileID: string
    • Optionaloptions: RequestOptions & {
          pollIntervalMs?: number;
      }

    Returns Promise<VectorStoreFile>

  • Update attributes on a vector store file.

    Parameters

    Returns APIPromise<VectorStoreFile>

  • Upload a file to the files API and then attach it to the given vector store.

    Note the file will be asynchronously processed (you can use the alternative polling helper method to wait for processing to complete).

    Parameters

    • vectorStoreId: string
    • file: Uploadable
    • Optionaloptions: RequestOptions

    Returns Promise<VectorStoreFile>

  • Add a file to a vector store and poll until processing is complete.

    Parameters

    • vectorStoreId: string
    • file: Uploadable
    • Optionaloptions: RequestOptions & {
          pollIntervalMs?: number;
      }

    Returns Promise<VectorStoreFile>