Parameters that are declared separately but passed to the handler as one value, such as a function named by an address and an architecture. More...
Parameters that are declared separately but passed to the handler as one value, such as a function named by an address and an architecture.
Call Parse, Lookup or both before passing the group to ToolBuilder::Param.
Public Member Functions | |
| Group (Params... params) | |
| template<detail::ParseFunction< typename Params::Value... > ParseFn> | |
| GroupParam< ParseFn, detail::KeepParsed, Params... > | Parse (ParseFn parse) && |
| Sets the function that combines the arguments into one value. | |
| template<detail::LookupFunction< typename Params::Value... > LookupFn> | |
| auto | Lookup (LookupFn lookup) && |
| Sets the function that finds what the arguments refer to. | |
|
inlineexplicit |
|
inline |
Sets the function that combines the arguments into one value.
It is called as parse(ToolCall&, Params::Value&...) and returns an ArgumentResult<T>. Its error is reported as invalid_params.
|
inline |
Sets the function that finds what the arguments refer to.
It is called as lookup(ToolCall&, Params::Value&...) and returns a bn::base::expected<T, ToolResult>. Its error becomes the tool's result. It runs only after every argument has been parsed.