Method UpdateMetadataAsync
UpdateMetadataAsync(string, string, MetadataCollection, MetadataUpdateMode, CancellationToken)
Asynchronously updates the metadata associated with an existing vector entry in the specified collection.
Task UpdateMetadataAsync(string collectionIdentifier, string id, MetadataCollection metadata, MetadataUpdateMode mode, 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.
modeMetadataUpdateModeControls how the supplied metadata is applied. Merge merges the new entries into the existing metadata (overwriting matching keys); Replace discards all existing metadata before applying the new entries.
cancellationTokenCancellationTokenAn optional token to cancel the asynchronous metadata update operation.
Returns
- Task
A task representing the asynchronous update operation.