llm_wire/anthropic

Configures the built-in Anthropic Messages adapter.

let config = anthropic.new(api_key) |> anthropic.config

The adapter targets https://api.anthropic.com/v1 and sends anthropic-version: 2023-06-01 unless with_version sets another. The key is held in a closure and never prints.

Types

pub opaque type Options

Values

pub fn config(options: Options) -> llm_wire.Config

The configuration of Anthropic calls, with the default limits and timeouts.

pub fn new(api_key: String) -> Options

Options for the API key api_key, trimmed.

pub fn with_version(options: Options, version: String) -> Options

Send this anthropic-version header.

✨ Search Document