Table of Contents

Memory

AI Toolbox supports Semantic Kernel memory functionality. To add the memory to the AI Toolbox use the AddMemory() method. This method is optional.

Memory Store

AI Toolbox provides out of the box a simple memory store, which can store data volatile (memory) or persistent (text file). AI Toolbox provides also NuGet packages for the Semantic Kernel memory store connectors.

Configuration

The AddMemory() method provides options and methods to configure the Semantic Kernel memory.

Tip

For memory configuration options please check the AIToolbox.Options.SemanticKernel namespace reference.

services
    .AddAIToolbox()
    .AddConnectors()
    .IncludeOllamaConnector(options => options.Endpoint = "http://localhost:11434")
    .AddKernel(options =>
    {
        options.Ollama = new OllamaOptions
        {
            ChatCompletion = new OllamaChatCompletionOptions { ModelId = "llama3" }
        };
    })
    .AddMemory(options =>
    {
        options.TextEmbeddingGeneration = new TextEmbeddingGenerationOptions
        {
            Ollama = new OllamaTextEmbeddingGenerationMemoryOptions
            {
                ModelId = "llama3"
            }
        };
    })
    .IncludeSimpleMemoryStore(options =>
    {
        options.Directory = "tmp-sk-memory";
        options.StorageType = StorageType.Persistent;
    });

Packages

AI Toolbox provides following NuGet packages for the Semantic Kernel memory connectors.