Partager via


MemoryBuilder Class

Definition

A builder for Memory plugin.

public sealed class MemoryBuilder
type MemoryBuilder = class
Public NotInheritable Class MemoryBuilder
Inheritance
MemoryBuilder

Constructors

MemoryBuilder()

Methods

Build()

Build a new instance of ISemanticTextMemory using the settings passed so far.

WithHttpClient(HttpClient)

Add an HttpClient.

WithLoggerFactory(ILoggerFactory)

Add a logger factory.

WithMemoryStore(IMemoryStore)

Add memory store.

WithMemoryStore<TStore>(Func<ILoggerFactory,HttpClient,TStore>)

Add memory store factory.

WithMemoryStore<TStore>(Func<ILoggerFactory,TStore>)

Add memory store factory.

WithTextEmbeddingGeneration(ITextEmbeddingGenerationService)

Add text embedding generation.

WithTextEmbeddingGeneration<TEmbeddingGeneration>(Func<ILoggerFactory,HttpClient,TEmbeddingGeneration>)

Add text embedding generation.

Extension Methods

WithChromaMemoryStore(MemoryBuilder, HttpClient, String)

Registers Chroma memory connector.

WithChromaMemoryStore(MemoryBuilder, String)

Registers Chroma memory connector.

WithOpenAITextEmbeddingGeneration(MemoryBuilder, String, String, String, HttpClient, Nullable<Int32>)

Adds the OpenAI text embeddings service. See https://platform.openai.com/docs for service details.

WithPineconeMemoryStore(MemoryBuilder, String, String, HttpClient)

Registers Pinecone memory connector.

WithPostgresMemoryStore(MemoryBuilder, IPostgresDbClient)

Registers Postgres memory connector.

WithPostgresMemoryStore(MemoryBuilder, NpgsqlDataSource, Int32, String)

Registers Postgres memory connector.

WithPostgresMemoryStore(MemoryBuilder, String, Int32, String)

Registers Postgres memory connector.

WithQdrantMemoryStore(MemoryBuilder, HttpClient, Int32, String)

Registers Qdrant memory connector.

WithQdrantMemoryStore(MemoryBuilder, String, Int32)

Registers Qdrant memory connector.

WithSqlServerMemoryStore(MemoryBuilder, String, String)

Registers SQL Server or Azure SQL connector.

WithWeaviateMemoryStore(MemoryBuilder, HttpClient, String, String, String)

Registers Weaviate memory connector.

WithWeaviateMemoryStore(MemoryBuilder, String, String, String)

Registers Weaviate memory connector.

WithGoogleAITextEmbeddingGeneration(MemoryBuilder, String, String, GoogleAIVersion, HttpClient)

Add GoogleAI embeddings generation service to the memory builder.

WithVertexAITextEmbeddingGeneration(MemoryBuilder, String, Func<ValueTask<String>>, String, String, VertexAIVersion, HttpClient)

Add VertexAI embeddings generation service to the memory builder.

WithVertexAITextEmbeddingGeneration(MemoryBuilder, String, String, String, String, VertexAIVersion, HttpClient)

Add VertexAI embeddings generation service to the memory builder.

Applies to