Summary
Functions
Produces a deterministic assistant-like summary based on the first :user_message in state.history.
Functions
Produces a deterministic assistant-like summary based on the first :user_message in state.history.
If the first user message contains a line starting with Step:, the identifier after that prefix is used; otherwise "unknown" is used. Returns an {:ok, map} shaped like a workflow provider response with text set to "summary:<step>", empty reasoning fields, no function calls, and finish_reason: :stop.
Parameters
- state: Map containing a
:historykey with a list of message maps (each message is expected to have:typeanddata["text"]). - _opts: Unused options (kept for provider compatibility).
Examples
iex> Mix.Tasks.Pixir.Smoke.Workflows.EchoProvider.stream(%{history: [%{type: :user_message, data: %{"text" => "Step: alpha"}}]}, [])
{:ok, %{text: "summary:alpha", reasoning: "", reasoning_items: [], function_calls: [], finish_reason: :stop}}