BeamAgent.LLM.Client behaviour (beam_agent v0.2.0)

Copy Markdown View Source

Behaviour implemented by every LLM provider.

Summary

Types

message()

@type message() :: %{role: atom(), content: String.t()}

response()

@type response() :: {:reply, String.t()} | {:tool_call, tool_call()}

tool_call()

@type tool_call() :: %{id: String.t(), name: atom(), arguments: map()}

Callbacks

chat(list, keyword)

@callback chat(
  [message()],
  keyword()
) :: response()