Skip to contents

When a model decides to call tools, finish_reason(x) is "tool" and this helper returns what it asked for. call_llm_tools() uses it internally; it is exported so custom loops can be built on it.

Usage

tool_calls(x)

Arguments

x

An llmr_response object.

Value

A list with one element per requested call: list(id =, name =, arguments =) where arguments is a named list. list() when the response contains no tool calls.