Skip to contents

Generate and close an assistant ChatML turn from a BebeLM agent

Usage

bebel_assistant_turn(
  agent,
  on_event = bebel_console_event(),
  check_interrupt = TRUE
)

Arguments

agent

A BebelAgent object.

on_event

Event callback, named list of event-specific handlers, or NULL. Event types are bebel_event_types(). Delta events contain delta, id, and index; final events contain accumulated content or text. Use bebel_console_event() for live console output.

check_interrupt

Check for Ctrl-C during prefill and before every decoded token.

Value

A classed generation result.