Partager via


PineconeVectorStoreRecordCollection<TRecord>.UpsertAsync Method

Definition

Upserts a record into the vector store. Does not guarantee that the collection exists. If the record already exists, it will be updated. If the record does not exist, it will be created.

public System.Threading.Tasks.Task<string> UpsertAsync (TRecord record, Microsoft.SemanticKernel.Data.UpsertRecordOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpsertAsync : 'Record * Microsoft.SemanticKernel.Data.UpsertRecordOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.UpsertAsync : 'Record * Microsoft.SemanticKernel.Data.UpsertRecordOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function UpsertAsync (record As TRecord, Optional options As UpsertRecordOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

record
TRecord

The record to upsert.

options
UpsertRecordOptions

Optional options for upserting the record.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

The unique identifier for the record.

Implements

Applies to