Skip to contents

wait_turn() waits until a turn (run by another process) is no longer running. stop_turn() stops a running turn wherever it runs: it ends stopped within about a second (a waiting or interrupted turn, which nothing runs, ends abandoned). resume_turn() goes on with a turn that waits (every approval answered) or was interrupted, here: its program runs again with the same inputs and earlier turns, each model reply it had and each tool result it kept are reused (nothing is paid for or run twice). A tool that started and has no result may have run: results says what it returned, rerun runs it again. abandon_turn() ends a waiting or interrupted turn without going on.

Usage

wait_turn(turn, timeout = NULL)

stop_turn(turn)

abandon_turn(turn)

resume_turn(turn, results = list(), rerun = integer(0))

Arguments

turn

A turn (ai_turn(), or a waiting condition's $turn).

timeout

Seconds to wait at most (NULL: no limit).

results

What tools that may have run returned, by invocation: list("2" = "refunded").

rerun

The invocations of tools to run again.

Value

resume_turn(): the turn's answer; wait_turn(): the turn.