Skip to main content

make_stop

Function make_stop 

Source
pub fn make_stop(options: MakeStopOptions) -> Result<FunctionTool>
Expand description

Creates a stop tool. An absent, null or empty message becomes DEFAULT_STOP_MESSAGE, so the loop always ends with a final message.

use strands::vended_tools::stop::{MakeStopOptions, make_stop};

let finish = make_stop(MakeStopOptions::builder().name("finish").build())?;
assert_eq!(strands::Tool::name(&finish), "finish");

ยงErrors

When max_message_length is 0.