View Source LlmComposer.ProviderResponse protocol (llm_composer v0.19.2)

Protocol that turns provider-specific raw responses into LlmComposer.LlmResponse structs.

Each provider adapter must wrap its raw HTTP result into a dedicated struct and implement this protocol. The protocol implementation is responsible for parsing the provider payload, extracting function calls, tokens, stream handles, etc., and returning the normalized response.

Summary

Types

t()

All the types that implement this protocol.

Types

@type t() :: term()

All the types that implement this protocol.

Functions

Link to this function

to_llm_response(raw_response, opts)

View Source
@spec to_llm_response(
  t(),
  keyword()
) :: {:ok, LlmComposer.LlmResponse.t()} | {:error, term()}