Expand description
Proc macros for the Oino guest SDK.
#[oino_extension::tool] on an async fn name(&'static self, args: A, cx: ToolCtx) -> Result<ToolResult> inside an impl block generates a sibling fn name_tool() -> Tool<Self>
whose description is the doc comment and whose parameters come from A: JsonSchema.
ⓘ
impl Notify {
/// Send a notification to the user.
#[oino_extension::tool(label = "Notify user", kind = Other)]
async fn notify_user(&'static self, args: NotifyArgs, cx: ToolCtx) -> Result<ToolResult> { … }
}
// in init: cx.tool(Self::notify_user_tool());Attribute Macros§
- tool
- Generates
fn <name>_tool() -> ::oino_extension::tool::Tool<Self>for a tool method.