Share via


RedisMemoryStore Constructors

Definition

Overloads

RedisMemoryStore(IDatabase, Int32, Schema+VectorField+VectorAlgo, VectorDistanceMetric, Int32)

Create a new instance of semantic memory using Redis.

RedisMemoryStore(String, Int32, Schema+VectorField+VectorAlgo, VectorDistanceMetric, Int32)

Create a new instance of semantic memory using Redis.

RedisMemoryStore(IDatabase, Int32, Schema+VectorField+VectorAlgo, VectorDistanceMetric, Int32)

Create a new instance of semantic memory using Redis.

public RedisMemoryStore (StackExchange.Redis.IDatabase database, int vectorSize = 1536, NRedisStack.Search.Schema.VectorField.VectorAlgo vectorIndexAlgorithm = NRedisStack.Search.Schema+VectorField+VectorAlgo.HNSW, Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric vectorDistanceMetric = Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric.COSINE, int queryDialect = 2);
new Microsoft.SemanticKernel.Connectors.Redis.RedisMemoryStore : StackExchange.Redis.IDatabase * int * NRedisStack.Search.Schema.VectorField.VectorAlgo * Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric * int -> Microsoft.SemanticKernel.Connectors.Redis.RedisMemoryStore
Public Sub New (database As IDatabase, Optional vectorSize As Integer = 1536, Optional vectorIndexAlgorithm As Schema.VectorField.VectorAlgo = NRedisStack.Search.Schema+VectorField+VectorAlgo.HNSW, Optional vectorDistanceMetric As VectorDistanceMetric = Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric.COSINE, Optional queryDialect As Integer = 2)

Parameters

database
StackExchange.Redis.IDatabase

The database of the Redis server.

vectorSize
Int32

Embedding vector size, defaults to 1536

vectorIndexAlgorithm
NRedisStack.Search.Schema.VectorField.VectorAlgo

Indexing algorithm for vectors, defaults to "HNSW"

vectorDistanceMetric
VectorDistanceMetric

Metric for measuring vector distances, defaults to "COSINE"

queryDialect
Int32

Query dialect, must be 2 or greater for vector similarity searching, defaults to 2

Applies to

RedisMemoryStore(String, Int32, Schema+VectorField+VectorAlgo, VectorDistanceMetric, Int32)

Create a new instance of semantic memory using Redis.

public RedisMemoryStore (string connectionString, int vectorSize = 1536, NRedisStack.Search.Schema.VectorField.VectorAlgo vectorIndexAlgorithm = NRedisStack.Search.Schema+VectorField+VectorAlgo.HNSW, Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric vectorDistanceMetric = Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric.COSINE, int queryDialect = 2);
new Microsoft.SemanticKernel.Connectors.Redis.RedisMemoryStore : string * int * NRedisStack.Search.Schema.VectorField.VectorAlgo * Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric * int -> Microsoft.SemanticKernel.Connectors.Redis.RedisMemoryStore
Public Sub New (connectionString As String, Optional vectorSize As Integer = 1536, Optional vectorIndexAlgorithm As Schema.VectorField.VectorAlgo = NRedisStack.Search.Schema+VectorField+VectorAlgo.HNSW, Optional vectorDistanceMetric As VectorDistanceMetric = Microsoft.SemanticKernel.Connectors.Redis.VectorDistanceMetric.COSINE, Optional queryDialect As Integer = 2)

Parameters

connectionString
String

Provide connection URL to a Redis instance

vectorSize
Int32

Embedding vector size, defaults to 1536

vectorIndexAlgorithm
NRedisStack.Search.Schema.VectorField.VectorAlgo

Indexing algorithm for vectors, defaults to "HNSW"

vectorDistanceMetric
VectorDistanceMetric

Metric for measuring vector distances, defaults to "COSINE"

queryDialect
Int32

Query dialect, must be 2 or greater for vector similarity searching, defaults to 2

Applies to