pub struct InlineCallableTool { /* private fields */ }Expand description
以函数声明 + handler 组合的可调用工具。
Implementations§
Source§impl InlineCallableTool
impl InlineCallableTool
Sourcepub fn from_declarations(declarations: Vec<FunctionDeclaration>) -> Self
pub fn from_declarations(declarations: Vec<FunctionDeclaration>) -> Self
通过 FunctionDeclaration 列表创建工具。
Sourcepub fn register_handler<F, Fut>(&mut self, name: impl Into<String>, handler: F)
pub fn register_handler<F, Fut>(&mut self, name: impl Into<String>, handler: F)
注册 handler。
Trait Implementations§
Source§impl CallableTool for InlineCallableTool
impl CallableTool for InlineCallableTool
Source§impl Default for InlineCallableTool
impl Default for InlineCallableTool
Source§fn default() -> InlineCallableTool
fn default() -> InlineCallableTool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InlineCallableTool
impl !RefUnwindSafe for InlineCallableTool
impl Send for InlineCallableTool
impl Sync for InlineCallableTool
impl Unpin for InlineCallableTool
impl UnsafeUnpin for InlineCallableTool
impl !UnwindSafe for InlineCallableTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more