anthropic

fun anthropic(apiKey: String, settings: AnthropicClientSettings = AnthropicClientSettings(), baseClient: HttpClient = HttpClient(), clock: Clock = Clock.System): PromptExecutorBuilder(source)

Adds an Anthropic client.

Multiple Anthropic clients are allowed — adding more than one will result in a RoutingLLMPromptExecutor being created at build time.

Return

This builder instance for chaining.

Parameters

apiKey

The API key for authenticating with the Anthropic API.

settings

Configuration settings for the Anthropic client. Defaults to AnthropicClientSettings.

baseClient

The HTTP client used for API requests. Defaults to a new HttpClient.

clock

The clock used for time-related operations. Defaults to Clock.System.