Package-level declarations
Types
Link copied to clipboard
class AnthropicChatModel(client: HttpClient, apiKey: String, model: String, maxTokens: Int = DEFAULT_MAX_TOKENS, parameters: JsonObject = JsonObject(emptyMap()), headers: Map<String, String> = emptyMap(), baseUrl: String = "https://api.anthropic.com", timeout: Duration? = 5.minutes, cache: PromptCache? = null) : ChatModel
A ChatModel that calls Claude through the Messages API of Anthropic. It is built on Ktor, so it runs on every Kotlin target.
Link copied to clipboard
How long Claude keeps what it read, for cache of AnthropicChatModel. Each request that reuses it starts the time again. Keeping tokens costs more than reading them once: a quarter more for FIVE_MINUTES and twice the price for ONE_HOUR.