Method UpdateMetadataAsync
UpdateMetadataAsync(string, string, MetadataCollection, bool, CancellationToken)
Asynchronously updates the metadata associated with an existing vector entry in the specified collection.
Task UpdateMetadataAsync(string collectionIdentifier, string id, MetadataCollection metadata, bool clearFirst, CancellationToken cancellationToken = default)
Parameters
collectionIdentifierstringThe name of the collection containing the vector whose metadata is to be updated.
idstringThe unique identifier of the vector entry for which the metadata is being updated.
metadataMetadataCollectionA collection of key-value pairs representing the metadata to update. The keys correspond to metadata names, and the values are the new values to be set.
clearFirstboolIf set to
true, any existing metadata will be cleared before the new metadata is applied. Iffalse, the new metadata will be merged with the existing metadata.cancellationTokenCancellationTokenAn optional token to cancel the asynchronous metadata update operation.
Returns
- Task
A task representing the asynchronous update operation.