IOpenAIClient.CreateVectorStoreFileAsync

IOpenAIClient.CreateVectorStoreFileAsync method

Creates a new vector store file asynchronously.

public Task<VectorStoreFileResponse> CreateVectorStoreFileAsync(string vectorStoreId, 
    VectorStoreFileCreateRequest vectorStoreFileCreateRequest, 
    CancellationToken? cancellationToken = default)
ParameterTypeDescription
vectorStoreIdStringThe ID of the vector store where the file will be created.
vectorStoreFileCreateRequestVectorStoreFileCreateRequestThe request object containing details for creating the file.
cancellationTokenNullable`1A token to cancel the operation.

Return Value

A task that represents the asynchronous operation. The task result contains the response from the file creation.

Exceptions

exceptioncondition
AIClientExceptionThrown when the vector store Id is null or empty.

See Also