Method UpsertAsync
UpsertAsync(string, string, float[], MetadataCollection, CancellationToken)
Asynchronously inserts a new vector entry or updates an existing one in the specified collection, along with its associated metadata.
Task UpsertAsync(string collectionIdentifier, string id, float[] vectors, MetadataCollection metadata, CancellationToken cancellationToken = default)
Parameters
collectionIdentifierstringThe name of the collection in which the vector will be stored.
idstringA unique identifier for the vector entry.
vectorsfloat[]An array of floats representing the vector data. The length of the array must match the vector size defined for the collection.
metadataMetadataCollectionA collection of metadata associated with the vector entry.
cancellationTokenCancellationTokenAn optional cancellation token to cancel the asynchronous upsert operation.
Returns
- Task
A task representing the asynchronous upsert operation.