adk_llm_anthropic_request (erlang_adk v0.8.0)

View Source

Bounded Messages API request construction for the Anthropic adapter.

This module deliberately receives the complete runtime config but copies only documented generation fields. In particular, API keys and runtime handles can never enter the JSON payload through an accidental map merge.

Summary

Functions

Translate the existing ADK function declaration contract (name, optional description, and parameters) into Anthropic client tools.

Functions

build(Config, Memory, Tools)

-spec build(map(), term(), term()) -> {ok, map()} | {error, term()}.

build(Config, Memory, Tools, Stream)

-spec build(map(), term(), term(), boolean()) -> {ok, map()} | {error, term()}.

encode_tools(Tools)

-spec encode_tools(term()) -> {ok, [map()]} | {error, term()}.

Translate the existing ADK function declaration contract (name, optional description, and parameters) into Anthropic client tools.

max_request_bytes()

-spec max_request_bytes() -> pos_integer().