Liking cljdoc? Tell your friends :D

anthropic.beta.messages

Idiomatic Clojure wrapper for the beta Messages API.

Idiomatic Clojure wrapper for the beta Messages API.
raw docstring

beta-batch-resultsclj

(beta-batch-results client id)
source

cancel-beta-batchclj

(cancel-beta-batch client id)
source

count-beta-tokensclj

(count-beta-tokens client req)
(count-beta-tokens client req opts)

Count beta Messages input tokens without creating a message. Request maps support cache-control, context-management, mcp-servers, response-format, effort, task-budget, output-format, speed, user-profile-id, extra-headers, extra-query, and extra-body. Returns :input-tokens and, when present, nested :context-management data.

Count beta Messages input tokens without creating a message. Request maps
support cache-control, context-management, mcp-servers, response-format,
effort, task-budget, output-format, speed, user-profile-id, extra-headers,
extra-query, and extra-body. Returns :input-tokens and, when present, nested
:context-management data.
sourceraw docstring

create-beta-batchclj

(create-beta-batch client req)
source

create-beta-messageclj

(create-beta-message client req)
(create-beta-message client req opts)

Send a beta Messages request and return a generic Clojure map response.

Request maps support context-management, diagnostics, speed, and tool-choice disable-parallel-tool-use options. Tool specs support response-inclusion, input-examples, eager-input-streaming, caching, and dated :version options. System text and text content blocks accept citation-list :citations; document content blocks accept boolean or {:enabled ...} citation configuration. Custom tools accept optional :description and :input-schema; an omitted schema defaults to the SDK's object schema.

Send a beta Messages request and return a generic Clojure map response.

Request maps support context-management, diagnostics, speed, and tool-choice
disable-parallel-tool-use options. Tool specs support response-inclusion,
input-examples, eager-input-streaming, caching, and dated :version options.
System text and text content blocks accept citation-list `:citations`; document
content blocks accept boolean or `{:enabled ...}` citation configuration.
Custom tools accept optional :description and :input-schema; an omitted schema
defaults to the SDK's object schema.
sourceraw docstring

delete-beta-batchclj

(delete-beta-batch client id)
source

get-beta-batchclj

(get-beta-batch client id)
source

list-beta-batchesclj

(list-beta-batches client)
(list-beta-batches client opts)
source

reduce-beta-batch-resultsclj

(reduce-beta-batch-results client id f init)
source

run-beta-toolsclj

(run-beta-tools client params)
(run-beta-tools client params opts)

Run beta Messages with local tool functions until no tool is requested.

Options include :max-iterations, :on-message, and :on-turn. :on-turn receives each assistant response and the current params, and returns params for the next iteration, allowing tools and request settings to change. Tool specs support response-inclusion, input-examples, eager-input-streaming, caching, and dated :version options.

Run beta Messages with local tool functions until no tool is requested.

Options include `:max-iterations`, `:on-message`, and `:on-turn`. `:on-turn`
receives each assistant response and the current params, and returns params
for the next iteration, allowing tools and request settings to change. Tool
specs support response-inclusion, input-examples, eager-input-streaming,
caching, and dated :version options.
sourceraw docstring

stream-beta-messageclj

(stream-beta-message client req on-event)
source

stream-beta-textclj

(stream-beta-text client req on-text)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close