AzureConfig

org.llm4s.llmconnect.config.AzureConfig
See theAzureConfig companion class
object AzureConfig

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(endpoint: String, apiKey: String, model: String, apiVersion: String, contextWindow: Int, reserveCompletion: Int, timeouts: ProviderTimeouts, tokenProvider: Option[AccessTokenProvider]): AzureConfig

Builds a config without validating it; fromValues validates. timeouts defaults to ProviderTimeouts.default, and tokenProvider to none: the API key authenticates.

Builds a config without validating it; fromValues validates. timeouts defaults to ProviderTimeouts.default, and tokenProvider to none: the API key authenticates.

Attributes

def apply(endpoint: String, apiKey: String, model: String, apiVersion: String, contextWindow: Int, reserveCompletion: Int, timeouts: ProviderTimeouts): AzureConfig

The shape before tokenProvider (#2274): API-key authentication.

The shape before tokenProvider (#2274): API-key authentication.

Attributes

def apply(endpoint: String, apiKey: String, model: String): AzureConfig

The endpoint, API key and deployment name, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. The API version is DEFAULT_API_VERSION, and contextWindow and reserveCompletion come from the model name alone (gpt-4o is 128k, an unknown model 8192); set them, and the rest, with the with* setters, or use fromValues to consult the bundled model catalogue.

The endpoint, API key and deployment name, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. The API version is DEFAULT_API_VERSION, and contextWindow and reserveCompletion come from the model name alone (gpt-4o is 128k, an unknown model 8192); set them, and the rest, with the with* setters, or use fromValues to consult the bundled model catalogue.

Attributes

def fromTokenProvider(modelName: String, endpoint: String, tokenProvider: AccessTokenProvider, apiVersion: String)(using ContextWindowResolver): Result[AzureConfig]

fromValues for keyless Microsoft Entra ID authentication (#2274): validates the endpoint and resolves the context window from the model catalogue, with tokenProvider in place of an API key.

fromValues for keyless Microsoft Entra ID authentication (#2274): validates the endpoint and resolves the context window from the model catalogue, with tokenProvider in place of an API key.

Attributes

def fromValues(modelName: String, endpoint: String, apiKey: String, apiVersion: String)(using ContextWindowResolver): Result[AzureConfig]

Constructs an AzureConfig, resolving contextWindow and reserveCompletion from the model name automatically.

Constructs an AzureConfig, resolving contextWindow and reserveCompletion from the model name automatically.

The resolver checks Azure-specific and OpenAI model catalogues in order before falling back to name-pattern matching.

Value parameters

apiKey

Azure API key; must be non-empty.

apiVersion

Azure OpenAI API version string.

endpoint

Azure deployment endpoint URL; must be non-empty.

modelName

Deployment name used as the model identifier.

Attributes

def keyless(endpoint: String, model: String, tokenProvider: AccessTokenProvider): AzureConfig

A keyless config (#2274): the endpoint and deployment name, authenticated with Microsoft Entra ID tokens from tokenProvider - such as AzureEntraId.defaultCredential() from llm4s-azure-identity - every other field at its default, as apply gives it. Usable from Java and Kotlin.

A keyless config (#2274): the endpoint and deployment name, authenticated with Microsoft Entra ID tokens from tokenProvider - such as AzureEntraId.defaultCredential() from llm4s-azure-identity - every other field at its default, as apply gives it. Usable from Java and Kotlin.

Attributes

Concrete fields

val DEFAULT_API_VERSION: String

The Azure OpenAI API version used when a provider section sets no apiVersion.

The Azure OpenAI API version used when a provider section sets no apiVersion.

This was DefaultConfig.DEFAULT_AZURE_V2025_01_01_PREVIEW in llm4s-core until the provider moved to llm4s-openai (#1132).

Attributes