AzureCosmosDBMongoDBVectorStore.GetCollection<TKey,TRecord> Method

Definition

Get a collection from the vector store.

public Microsoft.SemanticKernel.Data.IVectorStoreRecordCollection<TKey,TRecord> GetCollection<TKey,TRecord> (string name, Microsoft.SemanticKernel.Data.VectorStoreRecordDefinition? vectorStoreRecordDefinition = default) where TRecord : class;

Type Parameters

TKey

The data type of the record key.

TRecord

The record data model to use for adding, updating and retrieving data from the collection.

Parameters

name
String

The name of the collection.

vectorStoreRecordDefinition
VectorStoreRecordDefinition

Defines the schema of the record type.

Returns

A new IVectorStoreRecordCollection<TKey,TRecord> instance for managing the records in the collection.

Implements

Applies to