Share via


IKernelBuilder Interface

Definition

Provides a builder for constructing instances of Kernel.

public interface IKernelBuilder
type IKernelBuilder = interface
Public Interface IKernelBuilder

Properties

Plugins

Gets a builder for adding collections as singletons to Services.

Services

Gets the collection of services to be built into the Kernel.

Extension Methods

AddAzureAIInferenceChatCompletion(IKernelBuilder, String, ChatCompletionsClient, String)

Adds the AzureAIInferenceChatCompletionService to the Services.

AddAzureAIInferenceChatCompletion(IKernelBuilder, String, TokenCredential, Uri, HttpClient, String)

Adds the AzureAIInferenceChatCompletionService to the Services.

AddAzureAIInferenceChatCompletion(IKernelBuilder, String, String, Uri, HttpClient, String)

Adds the AzureAIInferenceChatCompletionService to the Services.

AddAzureAISearchVectorStore(IKernelBuilder, AzureAISearchVectorStoreOptions, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where SearchIndexClient is retrieved from the dependency injection container.

AddAzureAISearchVectorStore(IKernelBuilder, Uri, AzureKeyCredential, AzureAISearchVectorStoreOptions, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStore with the provided Uri and AzureKeyCredential and the specified service ID.

AddAzureAISearchVectorStore(IKernelBuilder, Uri, TokenCredential, AzureAISearchVectorStoreOptions, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStore with the provided Uri and TokenCredential and the specified service ID.

AddAzureAISearchVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, AzureAISearchVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2, Microsoft.Extensions.VectorData.IVectorizedSearch`1 and Microsoft.Extensions.VectorData.IVectorizableTextSearch`1 with the specified service ID and where SearchIndexClient is retrieved from the dependency injection container.

AddAzureAISearchVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, Uri, AzureKeyCredential, AzureAISearchVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2, Microsoft.Extensions.VectorData.IVectorizedSearch`1 and Microsoft.Extensions.VectorData.IVectorizableTextSearch`1 with the provided Uri and AzureKeyCredential and the specified service ID.

AddAzureAISearchVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, Uri, TokenCredential, AzureAISearchVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure AI Search Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2, Microsoft.Extensions.VectorData.IVectorizedSearch`1 and Microsoft.Extensions.VectorData.IVectorizableTextSearch`1 with the provided Uri and TokenCredential and the specified service ID.

AddAzureCosmosDBMongoDBVectorStore(IKernelBuilder, AzureCosmosDBMongoDBVectorStoreOptions, String)

Register a Azure CosmosDB MongoDB Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container.

AddAzureCosmosDBMongoDBVectorStore(IKernelBuilder, String, String, AzureCosmosDBMongoDBVectorStoreOptions, String)

Register a Azure CosmosDB MongoDB Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided connectionString and databaseName.

AddAzureCosmosDBMongoDBVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, AzureCosmosDBMongoDBVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure CosmosDB MongoDB Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container.

AddAzureCosmosDBMongoDBVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, String, String, AzureCosmosDBMongoDBVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure CosmosDB MongoDB Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided connectionString and databaseName.

AddAzureCosmosDBNoSQLVectorStore(IKernelBuilder, AzureCosmosDBNoSQLVectorStoreOptions, String)

Register an Azure CosmosDB NoSQL Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Azure CosmosDB NoSQL Database is retrieved from the dependency injection container.

AddAzureCosmosDBNoSQLVectorStore(IKernelBuilder, String, String, AzureCosmosDBNoSQLVectorStoreOptions, String)

Register an Azure CosmosDB NoSQL Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Azure CosmosDB NoSQL Database is constructed using the provided connectionString and databaseName.

AddAzureCosmosDBNoSQLVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, AzureCosmosDBNoSQLVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure CosmosDB NoSQL Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Azure CosmosDB NoSQL Database is retrieved from the dependency injection container.

AddAzureCosmosDBNoSQLVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, String, String, AzureCosmosDBNoSQLVectorStoreRecordCollectionOptions<TRecord>, String)

Register an Azure CosmosDB NoSQL Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Azure CosmosDB NoSQL Database is constructed using the provided connectionString and databaseName.

AddAzureOpenAIAudioToText(IKernelBuilder, String, AzureOpenAIClient, String, String)

Adds the AzureOpenAIAudioToTextService to the Services.

AddAzureOpenAIAudioToText(IKernelBuilder, String, String, TokenCredential, String, String, HttpClient, String)

Adds the AzureOpenAIAudioToTextService to the Services.

AddAzureOpenAIAudioToText(IKernelBuilder, String, String, String, String, String, HttpClient, String)

Adds the AzureOpenAIAudioToTextService to the Services.

AddAzureOpenAIChatCompletion(IKernelBuilder, String, AzureOpenAIClient, String, String)

Adds the AzureOpenAIChatCompletionService to the Services.

AddAzureOpenAIChatCompletion(IKernelBuilder, String, String, TokenCredential, String, String, HttpClient, String)

Adds the AzureOpenAIChatCompletionService to the Services.

AddAzureOpenAIChatCompletion(IKernelBuilder, String, String, String, String, String, HttpClient, String)

Adds the AzureOpenAIChatCompletionService to the Services.

AddAzureOpenAITextEmbeddingGeneration(IKernelBuilder, String, AzureOpenAIClient, String, String, Nullable<Int32>)

Adds the AzureOpenAITextEmbeddingGenerationService to the Services.

AddAzureOpenAITextEmbeddingGeneration(IKernelBuilder, String, String, TokenCredential, String, String, HttpClient, Nullable<Int32>, String)

Adds the AzureOpenAITextEmbeddingGenerationService to the Services.

AddAzureOpenAITextEmbeddingGeneration(IKernelBuilder, String, String, String, String, String, HttpClient, Nullable<Int32>, String)

Adds the AzureOpenAITextEmbeddingGenerationService to the Services.

AddAzureOpenAITextToAudio(IKernelBuilder, String, String, TokenCredential, String, String, HttpClient, String)

Adds the AzureOpenAITextToAudioService to the Services.

AddAzureOpenAITextToAudio(IKernelBuilder, String, String, String, String, String, HttpClient, String)

Adds the AzureOpenAITextToAudioService to the Services.

AddAzureOpenAITextToImage(IKernelBuilder, String, AzureOpenAIClient, String, String)

Adds the AzureOpenAITextToImageService to the Services.

AddAzureOpenAITextToImage(IKernelBuilder, String, String, TokenCredential, String, String, String)

Adds the AzureOpenAITextToImageService to the Services.

AddAzureOpenAITextToImage(IKernelBuilder, String, String, String, String, String, String, HttpClient)

Adds the AzureOpenAITextToImageService to the Services.

AddGoogleAIEmbeddingGeneration(IKernelBuilder, String, String, GoogleAIVersion, String, HttpClient, Nullable<Int32>)

Add Google AI embeddings generation service to the kernel builder.

AddGoogleAIGeminiChatCompletion(IKernelBuilder, String, String, GoogleAIVersion, String, HttpClient)

Add Google AI Gemini Chat Completion and Text Generation services to the kernel builder.

AddHuggingFaceChatCompletion(IKernelBuilder, String, Uri, String, String, HttpClient)

Adds an Hugging Face chat completion service with the specified configuration.

AddHuggingFaceChatCompletion(IKernelBuilder, Uri, String, String, HttpClient)

Adds an Hugging Face chat completion service with the specified configuration.

AddHuggingFaceImageToText(IKernelBuilder, String, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

AddHuggingFaceImageToText(IKernelBuilder, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

AddHuggingFaceTextEmbeddingGeneration(IKernelBuilder, String, Uri, String, String, HttpClient)

Adds an Hugging Face text embedding generation service with the specified configuration.

AddHuggingFaceTextEmbeddingGeneration(IKernelBuilder, Uri, String, String, HttpClient)

Adds an Hugging Face text embedding generation service with the specified configuration.

AddHuggingFaceTextGeneration(IKernelBuilder, String, Uri, String, String, HttpClient)

Adds an Hugging Face text generation service with the specified configuration.

AddHuggingFaceTextGeneration(IKernelBuilder, Uri, String, String, HttpClient)

Adds an Hugging Face text generation service with the specified configuration.

Build(IKernelBuilder)

Constructs a new instance of Kernel using all of the settings configured on the builder.

AddMistralChatCompletion(IKernelBuilder, String, String, Uri, String, HttpClient)

Adds an Mistral chat completion service with the specified configuration.

AddMistralTextEmbeddingGeneration(IKernelBuilder, String, String, Uri, String, HttpClient)

Adds an Mistral text embedding generation service with the specified configuration.

AddOllamaChatCompletion(IKernelBuilder, OllamaApiClient, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaChatCompletion(IKernelBuilder, String, HttpClient, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaChatCompletion(IKernelBuilder, String, Uri, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaTextEmbeddingGeneration(IKernelBuilder, OllamaApiClient, String)

Add Ollama Text Embeddings Generation service to the kernel builder.

AddOllamaTextEmbeddingGeneration(IKernelBuilder, String, HttpClient, String)

Add Ollama Text Embeddings Generation service to the kernel builder.

AddOllamaTextEmbeddingGeneration(IKernelBuilder, String, Uri, String)

Add Ollama Text Embeddings Generation service to the kernel builder.

AddOllamaTextGeneration(IKernelBuilder, OllamaApiClient, String)

Add Ollama Text Generation service to the kernel builder.

AddOllamaTextGeneration(IKernelBuilder, String, OllamaApiClient, String)

Add Ollama Text Generation service to the kernel builder.

AddOllamaTextGeneration(IKernelBuilder, String, String, HttpClient)

Add Ollama Text Generation service to the kernel builder.

AddOllamaTextGeneration(IKernelBuilder, String, Uri, String)

Add Ollama Text Generation service to the kernel builder.

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, Stream, Stream, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, String, String, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

AddOnnxRuntimeGenAIChatCompletion(IKernelBuilder, String, String, String, JsonSerializerOptions)

Add OnnxRuntimeGenAI Chat Completion services to the kernel builder.

AddOpenAIAudioToText(IKernelBuilder, String, OpenAIClient, String)

Adds the OpenAI audio-to-text service to the list.

AddOpenAIAudioToText(IKernelBuilder, String, String, String, String, HttpClient)

Adds the OpenAI audio-to-text service to the list.

AddOpenAIChatCompletion(IKernelBuilder, String, OpenAIClient, String)

Adds the OpenAI chat completion service to the list.

AddOpenAIChatCompletion(IKernelBuilder, String, String, String, String, HttpClient)

Adds the OpenAI chat completion service to the list.

AddOpenAIChatCompletion(IKernelBuilder, String, Uri, String, String, String, HttpClient)

Adds the Custom Endpoint OpenAI chat completion service to the list.

AddOpenAIFiles(IKernelBuilder, String, String, String, HttpClient)
Obsolete.

Adds the OpenAIFileService to the IServiceCollection.

AddOpenAITextEmbeddingGeneration(IKernelBuilder, String, OpenAIClient, String, Nullable<Int32>)

Adds the OpenAITextEmbeddingGenerationService to the Services.

AddOpenAITextEmbeddingGeneration(IKernelBuilder, String, String, String, String, HttpClient, Nullable<Int32>)

Adds OpenAITextEmbeddingGenerationService to the Services.

AddOpenAITextToAudio(IKernelBuilder, String, String, String, String, HttpClient)

Adds the OpenAI text-to-audio service to the list.

AddOpenAITextToImage(IKernelBuilder, String, String, String, String, HttpClient)

Add the OpenAI Dall-E text to image service to the list

AddPineconeVectorStore(IKernelBuilder, PineconeVectorStoreOptions, String)

Register a Pinecone Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where Pinecone.PineconeClient is retrieved from the dependency injection container.

AddPineconeVectorStore(IKernelBuilder, String, PineconeVectorStoreOptions, String)

Register a Pinecone Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where Pinecone.PineconeClient is constructed using the provided apikey.

AddPineconeVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, PineconeVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Pinecone Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where Pinecone.PineconeClient is retrieved from the dependency injection container.

AddPineconeVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, String, PineconeVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Pinecone Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the provided Pinecone.PineconeClient and the specified service ID.

AddQdrantVectorStore(IKernelBuilder, QdrantVectorStoreOptions, String)

Register a Qdrant Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where Qdrant.Client.QdrantClient is retrieved from the dependency injection container.

AddQdrantVectorStore(IKernelBuilder, String, Int32, Boolean, String, QdrantVectorStoreOptions, String)

Register a Qdrant Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where Qdrant.Client.QdrantClient is constructed using the provided parameters.

AddQdrantVectorStoreRecordCollection<TKey,TRecord>(IKernelBuilder, String, QdrantVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Qdrant Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Qdrant Qdrant.Client.QdrantClient is retrieved from the dependency injection container.

AddQdrantVectorStoreRecordCollection<TKey,TRecord>(IKernelBuilder, String, String, Int32, Boolean, String, QdrantVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Qdrant Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the Qdrant Qdrant.Client.QdrantClient is constructed using the provided parameters.

AddRedisHashSetVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, RedisHashSetVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 with the specified service ID and where the Redis StackExchange.Redis.IDatabase is retrieved from the dependency injection container.

AddRedisHashSetVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, String, RedisHashSetVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 with the specified service ID and where the Redis StackExchange.Redis.IDatabase is constructed using the provided redisConnectionConfiguration.

AddRedisJsonVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, RedisJsonVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 with the specified service ID and where the Redis StackExchange.Redis.IDatabase is retrieved from the dependency injection container.

AddRedisJsonVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, String, RedisJsonVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 with the specified service ID and where the Redis StackExchange.Redis.IDatabase is constructed using the provided redisConnectionConfiguration.

AddRedisVectorStore(IKernelBuilder, RedisVectorStoreOptions, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is retrieved from the dependency injection container.

AddRedisVectorStore(IKernelBuilder, String, RedisVectorStoreOptions, String)

Register a Redis Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is constructed using the provided redisConnectionConfiguration.

AddVectorStoreTextSearch<TRecord>(IKernelBuilder, ITextSearchStringMapper, ITextSearchResultMapper, VectorStoreTextSearchOptions, String)

Register a VectorStoreTextSearch<TRecord> instance with the specified service ID.

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, Func<ValueTask<String>>, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, String, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

AddVertexAIGeminiChatCompletion(IKernelBuilder, String, Func<ValueTask<String>>, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI Gemini Chat Completion and Text Generation services to the kernel builder.

AddVertexAIGeminiChatCompletion(IKernelBuilder, String, String, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI Gemini Chat Completion and Text Generation services to the kernel builder.

AddWeaviateVectorStore(IKernelBuilder, HttpClient, WeaviateVectorStoreOptions, String)

Register a Weaviate Microsoft.Extensions.VectorData.IVectorStore with the specified service ID.

AddWeaviateVectorStoreRecordCollection<TRecord>(IKernelBuilder, String, HttpClient, WeaviateVectorStoreRecordCollectionOptions<TRecord>, String)

Register a Weaviate Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID.

AddBingTextSearch(IKernelBuilder, String, BingTextSearchOptions, String)

Register an ITextSearch instance with the specified service ID.

AddGoogleTextSearch(IKernelBuilder, String, String, GoogleTextSearchOptions, String)

Register an ITextSearch instance with the specified service ID.

AddTavilyTextSearch(IKernelBuilder, String, TavilyTextSearchOptions, String)

Register an ITextSearch instance with the specified service ID.

Applies to