AnthropicLLMClient
A client implementation for interacting with Anthropic's API in a suspendable and direct manner.
This class supports functionalities for executing text prompts and streaming interactions with the Anthropic API. It leverages Kotlin Coroutines to handle asynchronous operations and provides full support for configuring HTTP requests, including timeout handling and JSON serialization.
Parameters
Configurable settings for the Anthropic client, which include the base URL and other options.
A preconfigured Koog HTTP client used for API calls. Must have authentication and other request defaults already embedded. To use a Ktor-backed client with standard defaults, use the secondary constructor that accepts an API key and an io.ktor.client.HttpClient.
Clock instance used for tracking response metadata timestamps.
Constructors
Secondary constructor for creating an Anthropic client from a base Ktor HTTP client.
Properties
Functions
Moderation is not supported by the Anthropic API.