Documentation
Table of Contents

Class ChatClientBuilderExtensions

Namespace
IntentSharp.Extensions.AI
Assembly
IntentSharp.Extensions.AI.dll

Puts a Microsoft.Extensions.AI Microsoft.Extensions.AI.IChatClient behind an IntentClient.

var client = new IntentClientBuilder()
    .UseChatClient(azureOpenAIChatClient, name: "AzureOpenAI")
    .UseChatClientAsFallback(ollamaChatClient, name: "Ollama")
    .Build();
public static class ChatClientBuilderExtensions
Inheritance
object
ChatClientBuilderExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

Methods

UseChatClient(IntentClientBuilder, IChatClient, IEmbeddingGenerator<string, Embedding<float>>?, string?, string?, ILogger?)

Uses the chat client as the primary provider, wrapped in a ChatClientProvider. Calling it again replaces the primary.

UseChatClientAsFallback(IntentClientBuilder, IChatClient, IEmbeddingGenerator<string, Embedding<float>>?, string?, string?, ILogger?)

Uses the chat client as the fallback provider, called when the primary fails with a transient error (see FallbackOnTransientErrors). Calling it again replaces the fallback.