Behaviour for LLM model providers.
Implementations wrap a specific LLM API (Gemini, Claude, etc.) and return
streams of LlmResponse structs. When stream: false, the enumerable
yields a single response. When stream: true, it yields partial chunks
followed by a final response with turn_complete: true.
Summary
Functions
Calls generate_content/3 on any model struct via its implementing module.
Calls name/1 on any model struct via its implementing module.
Callbacks
@callback generate_content( model :: struct(), request :: ADK.Model.LlmRequest.t(), stream :: boolean() ) :: Enumerable.t()
Generates content from the model.
Returns an Enumerable.t() that yields LlmResponse.t() structs.
Returns the model's identifier string.
Functions
@spec generate_content(struct(), ADK.Model.LlmRequest.t(), boolean()) :: Enumerable.t()
Calls generate_content/3 on any model struct via its implementing module.
Calls name/1 on any model struct via its implementing module.