Table of Contents

Class APIEndpointClientOptions

Namespace
FoundationaLLM.Common.Clients.Http
Assembly
FoundationaLLM.Common.dll

Exposes client options for FoundationaLLM API endpoints.

public class APIEndpointClientOptions : ClientPipelineOptions
Inheritance
ClientPipelineOptions
APIEndpointClientOptions
Inherited Members
ClientPipelineOptions.AddPolicy(PipelinePolicy, PipelinePosition)
ClientPipelineOptions.Freeze()
ClientPipelineOptions.AssertNotFrozen()
ClientPipelineOptions.RetryPolicy
ClientPipelineOptions.MessageLoggingPolicy
ClientPipelineOptions.Transport
ClientPipelineOptions.NetworkTimeout
ClientPipelineOptions.ClientLoggingOptions
ClientPipelineOptions.EnableDistributedTracing
Extension Methods

Properties

APIKeyHeaderName

Gets or sets the name of the API key header to send.

public string? APIKeyHeaderName { get; set; }

Property Value

string

APIKeyPrefix

Gets or sets an optional prefix to add before the API key.

public string? APIKeyPrefix { get; set; }

Property Value

string

APIVersion

Gets the API version of the API endpoint.

public string? APIVersion { get; init; }

Property Value

string

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.