LlmCore.Agent.Components.InjectResults (llm_core v0.3.0)

Copy Markdown View Source

Builds the messages to append for the next LLM turn.

Constructs:

  1. An assistant message containing the tool call requests (so the LLM sees its own tool calls in conversation history)
  2. Tool result messages (one per result) in the provider-neutral format

These messages are stored in ctx.result_messages — the outer loop reads them and appends to the accumulated message list. This mirrors how a step-oriented loop executor accumulates step_results outside the pipeline.

Summary

Functions

Builds assistant + tool result messages from the current iteration.

Functions

call(ctx, opts)

Builds assistant + tool result messages from the current iteration.

Parameters

  • ctx%Context{} with response, tool_calls, and tool_results
  • opts — ALF stage options (unused)

Returns

Updated %Context{} with result_messages populated.