Skip to contents

Inside a tool_call hook: in a conversation the turn waits, saved, and goes on when someone answers (approve()); on a stream, .each is given the approval event and may answer it with approve() or deny(), and an interactive session is asked at the console otherwise; a plain call refuses (approval-required). decide answers in place of a person.

Usage

ai_ask(event, reason = NULL, decide = NULL)

Arguments

event

The tool_call event.

reason

Why it asks (shown with the question).

decide

A function of the approval giving TRUE, FALSE or a reason to refuse.

Value

Whether it may run (the model is shown the refusal otherwise).