adk_llm behaviour (erlang_adk v0.7.0)
View SourceSummary
Functions
Return normalized adapter capabilities. Unknown custom providers remain usable and conservatively report only the two required behavior callbacks.
Dispatch the call to the specified provider.
Dispatch the streaming call to the specified provider.
Dispatch the optional canonical content-delta stream. Providers which implement text streaming only fail explicitly instead of coercing maps to text or silently dropping parts.
Validate the provider reference and invoke its optional validator.
Types
-type config() :: map().
-type memory() :: [map()].
-type provider_outcome() :: {ok, binary() | string() | adk_content:content()} | {tool_calls, list()} | streamed.
-type provider_result() :: {provider_result, #{version := 1, provider := binary(), type := binary(), outcome := provider_outcome(), metadata := map()}}.
Callbacks
-callback capabilities() -> map().
-callback generate(Config :: config(), Memory :: memory(), Tools :: tools()) -> {ok, binary() | string() | adk_content:content()} | {tool_calls, list()} | provider_result() | {error, term()}.
-callback stream_content(Config :: config(), Memory :: memory(), Tools :: tools(), Callback :: fun((adk_content:content()) -> ok)) -> ok | {tool_calls, list()} | provider_result() | {error, term()}.
Functions
Return normalized adapter capabilities. Unknown custom providers remain usable and conservatively report only the two required behavior callbacks.
Dispatch the call to the specified provider.
Dispatch the streaming call to the specified provider.
Dispatch the optional canonical content-delta stream. Providers which implement text streaming only fail explicitly instead of coercing maps to text or silently dropping parts.
Validate the provider reference and invoke its optional validator.