DistributedCachingChatClientBuilderExtensions.UseDistributedCache Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a DistributedCachingChatClient as the next stage in the pipeline.
public static Microsoft.Extensions.AI.ChatClientBuilder UseDistributedCache (this Microsoft.Extensions.AI.ChatClientBuilder builder, Microsoft.Extensions.Caching.Distributed.IDistributedCache? storage = default, Action<Microsoft.Extensions.AI.DistributedCachingChatClient>? configure = default);
static member UseDistributedCache : Microsoft.Extensions.AI.ChatClientBuilder * Microsoft.Extensions.Caching.Distributed.IDistributedCache * Action<Microsoft.Extensions.AI.DistributedCachingChatClient> -> Microsoft.Extensions.AI.ChatClientBuilder
<Extension()>
Public Function UseDistributedCache (builder As ChatClientBuilder, Optional storage As IDistributedCache = Nothing, Optional configure As Action(Of DistributedCachingChatClient) = Nothing) As ChatClientBuilder
Parameters
- builder
- ChatClientBuilder
The ChatClientBuilder.
- storage
- IDistributedCache
An optional IDistributedCache instance that will be used as the backing store for the cache. If not supplied, an instance will be resolved from the service provider.
- configure
- Action<DistributedCachingChatClient>
An optional callback that can be used to configure the DistributedCachingChatClient instance.
Returns
The ChatClientBuilder provided as builder
.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET