The Anthropic Messages API backend, over java.net.http and cheshire. Beyond the
neutral request keys it reads :thinking-display and :fallbacks. See docs/llm.md
§ The Messages API backend.
The Anthropic Messages API backend, over `java.net.http` and `cheshire`. Beyond the neutral request keys it reads `:thinking-display` and `:fallbacks`. See docs/llm.md § The Messages API backend.
(available?)(available? {:keys [credential]})Is a credential reachable: opts's :credential, else one credentials finds?
Is a credential reachable: `opts`'s `:credential`, else one `credentials` finds?
(credentials)The credential to authenticate with, as {:kind :api-key|:bearer :value "…"}, or
nil: ANTHROPIC_API_KEY, then ANTHROPIC_AUTH_TOKEN, then an ant auth login
profile. The value is never logged, printed or put in an exception. See docs/llm.md
§ Credentials.
The credential to authenticate with, as `{:kind :api-key|:bearer :value "…"}`, or
nil: `ANTHROPIC_API_KEY`, then `ANTHROPIC_AUTH_TOKEN`, then an `ant auth login`
profile. The value is never logged, printed or put in an exception. See docs/llm.md
§ Credentials.The model this backend talks to unless told otherwise.
The model this backend talks to unless told otherwise.
Beta flag for the scalar fallbacks: "default" form — routes a policy decline to
Anthropic's recommended substitute model by refusal category.
Beta flag for the scalar `fallbacks: "default"` form — routes a policy decline to Anthropic's recommended substitute model by refusal category.
(parse-response m)The API's JSON message -> the neutral response map (vaelii.agents.llm.protocol).
The API's JSON message -> the neutral response map (`vaelii.agents.llm.protocol`).
(provider)(provider {:keys [credential base-url timeout-ms] :or {timeout-ms 600000}})An Anthropic-backed Provider.
opts:
:credential {:kind :api-key|:bearer :value "…"} — resolved from the
environment by credentials when absent
:base-url default https://api.anthropic.com (or ANTHROPIC_BASE_URL)
:timeout-ms default 600000; bounds the whole turn, the body included
Throws :llm-no-credential when no credential is reachable.
An Anthropic-backed `Provider`.
`opts`:
:credential `{:kind :api-key|:bearer :value "…"}` — resolved from the
environment by `credentials` when absent
:base-url default `https://api.anthropic.com` (or `ANTHROPIC_BASE_URL`)
:timeout-ms default 600000; bounds the whole turn, the body included
Throws `:llm-no-credential` when no credential is reachable.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |