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
The API key required to authenticate with the Anthropic service.
Configurable settings for the Anthropic client, which include the base URL and other options.
An optional custom configuration for the underlying HTTP client, defaulting to a Ktor client.
Clock instance used for tracking response metadata timestamps.
Constructors
Creates an instance of the AnthropicSuspendableDirectClient.