LegionWeb.HumanHandler (LegionWeb v0.3.0)

View Source

Built-in HumanTool handler for the Legion dashboard.

Receives {:human_request, ref, from_pid, question, meta} from HumanTool, broadcasts the question to the dashboard via PubSub, and waits for the user to respond through the UI.

Usage

Configure your agent to use this handler:

def tool_config(Legion.Tools.HumanTool) do
  [handler: LegionWeb.HumanHandler]
end

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

respond(run_id, text)

start_link(opts \\ [])