ion7-llm / response

class

ion7.llm.Response

content string Plain assistant text (post-strip).
thinking string? Reasoning block, preserved on tool turns.
tool_calls table[] `[{ id, name, arguments }, ...]`
tokens integer[] Sampled token ids.
n_tokens integer
stop_reason string `"stop" | "length" | "stop_string" | "tool_use" | "error"`
perf table `{ tok_per_s, n_eval, t_eval_ms, n_p_eval }`

Functions

Response.new

Build a Response.

Response.new(fields)
fieldstable
→ ion7.llm.Response

Response:has_tools

True when the response carries at least one tool call.

Response:has_tools()
→ boolean

Response:summary

One-line summary suited for logging. "[42 tok | 38.2 tok/s | stop]"

Response:summary()
→ string

Response:__tostring

`tostring(response)` returns the assistant content.

Response:__tostring()