Interface IClientFactoryService
- Namespace
- FoundationaLLM.Common.Interfaces
- Assembly
- FoundationaLLM.Common.dll
Defines a service for creating client instances used to process requests and responses.
public interface IClientFactoryService
- Extension Methods
Methods
CreateClient<T>(string, string, UnifiedUserIdentity, Func<Dictionary<string, object>, T>, Dictionary<string, object>?)
Creates a T client instance based on the client name and a client builder delegate.
Task<T> CreateClient<T>(string instanceId, string clientName, UnifiedUserIdentity userIdentity, Func<Dictionary<string, object>, T> clientBuilder, Dictionary<string, object>? clientBuilderParameters = null)
Parameters
instanceIdstringThe FoundationaLLM instance identifier.
clientNamestringThe name of the HTTP client to create. This name must be registered as an APIEndpointConfiguration resource in the FoundationaLLM.Configuration resource provider.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity of the caller requesting the client.
clientBuilderFunc<Dictionary<string, object>, T>A delegate that creates the
Tclient instance based on a dictionary of values. The keys available in the dictionary are defined in HttpClientFactoryServiceKeyNames.clientBuilderParametersDictionary<string, object>A dictionary of parameters to pass to the client builder delegate.
Returns
- Task<T>
A
Tclient instance.
Type Parameters
TThe type of the client to create.