Documentation
Table of Contents

Class IntentSharpSettings

Namespace
IntentSharp.DependencyInjection
Assembly
IntentSharp.dll

Settings bound from configuration (section "IntentSharp" by default).

public sealed class IntentSharpSettings
Inheritance
object
IntentSharpSettings
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

IntentSharpSettings()

Creates settings with the default on each property, reading the OpenAI and Anthropic keys from the OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables now.

Properties

AnthropicApiKey

The Anthropic API key. Defaults to the ANTHROPIC_API_KEY environment variable. When both keys are set, the provider that is not the primary becomes the fallback; null or blank leaves Anthropic out.

AnthropicModel

The Anthropic model used when a request names none. Null uses the provider's default model.

CacheCapacity

Entries the in-process request cache holds before it evicts the least recently used one. Default 1000.

EnableRequestCache

Serve identical requests from a request cache. Default true. The cache is the registered IRequestCache when there is one, otherwise an in-process cache of CacheCapacity entries.

MemoryPath

Path for SQLite memory. Null uses in-process memory; empty string disables memory.

OpenAIApiKey

The OpenAI API key. Defaults to the OPENAI_API_KEY environment variable. When both keys are set, the provider that is not the primary becomes the fallback; null or blank leaves OpenAI out.

OpenAIModel

The OpenAI model used when a request names none. Null uses the provider's default model.

Options

The client-wide options. From configuration they bind from the Options subsection, for example IntentSharp:Options:LicenseKey.

PrimaryProvider

"OpenAI" or "Anthropic", ignoring case. Defaults to whichever key is present, Anthropic first when both are. Any other value stops the client from being built with InvalidOperationException.

RateLimitBurst

Requests a provider may make in a burst before the throttle holds it to RateLimitPerSecond. Default 10.

RateLimitPerSecond

Requests per second per provider for the local throttle. 0 disables it.