Class HttpProviderSettings
- Namespace
- IntentSharp.Providers
- Assembly
- IntentSharp.dll
Settings shared by the HTTP providers.
public sealed class HttpProviderSettings
- Inheritance
-
objectHttpProviderSettings
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- HttpProviderSettings()
Creates settings with the default on each property and no API key or model, which a provider requires.
Properties
- ApiKey
The API key. Required: the provider constructor throws ArgumentException when it is blank.
- BaseAddress
The service address, ending in a slash. Null uses the provider's public endpoint. A supplied HttpClient that already has a base address keeps its own.
- InitialBackoff
The wait before the first retry. Each later retry doubles it, with jitter, up to 30 seconds; a 429 reply's Retry-After under two minutes is used instead. Default 500 milliseconds.
- MaxRetries
Retries for transient failures (429, 5xx, transport errors). Backoff is exponential with jitter.
- Model
The model used when a request names none. Required: the provider constructor throws ArgumentException when it is blank.
- Timeout
Time limit for one HTTP attempt; each retry gets its own. An attempt that runs out of time throws AITimeoutException and is not retried. Default 120 seconds. A supplied HttpClient keeps its own Timeout (100 seconds unless changed), which can end an attempt first with the same exception; set it to InfiniteTimeSpan or to more than this value.