Class APIEndpointClientOptions
- Namespace
- FoundationaLLM.Common.Clients.Http
- Assembly
- FoundationaLLM.Common.dll
Exposes client options for FoundationaLLM API endpoints.
public class APIEndpointClientOptions : ClientPipelineOptions
- Inheritance
-
ClientPipelineOptionsAPIEndpointClientOptions
- Inherited Members
-
ClientPipelineOptions.AddPolicy(PipelinePolicy, PipelinePosition)ClientPipelineOptions.Freeze()ClientPipelineOptions.AssertNotFrozen()ClientPipelineOptions.RetryPolicyClientPipelineOptions.MessageLoggingPolicyClientPipelineOptions.TransportClientPipelineOptions.NetworkTimeoutClientPipelineOptions.ClientLoggingOptionsClientPipelineOptions.EnableDistributedTracing
- Extension Methods
Properties
APIKeyHeaderName
Gets or sets the name of the API key header to send.
public string? APIKeyHeaderName { get; set; }
Property Value
APIKeyPrefix
Gets or sets an optional prefix to add before the API key.
public string? APIKeyPrefix { get; set; }
Property Value
APIVersion
Gets the API version of the API endpoint.
public string? APIVersion { get; init; }
Property Value
Methods
FromClientBuilderParameters(Dictionary<string, object>)
Creates an instance of APIEndpointClientOptions using the specified client builder parameters.
public static APIEndpointClientOptions FromClientBuilderParameters(Dictionary<string, object> clientBuilderParameters)
Parameters
clientBuilderParameters
Dictionary<string, object>A dictionary containing configuration parameters for the client. The dictionary keys should match the constants defined in HttpClientFactoryServiceKeyNames.
Returns
- APIEndpointClientOptions
An APIEndpointClientOptions instance populated with values from the provided
clientBuilderParameters
. If a required parameter is missing, default values are used.
Remarks
The following keys are expected in the clientBuilderParameters
dictionary:
- APIKeyHeaderName: The name of the header used for the API key.
- APIKeyPrefix: The prefix to prepend to the API key in the header.
- APIVersion: The version of the API to use.
- TimeoutSeconds: The network timeout in seconds. Defaults to 120 seconds if not specified.