Struct SkillHttpTool
pub struct SkillHttpTool { /* private fields */ }Expand description
A tool derived from a skill’s [[tools]] section that makes HTTP requests.
Implementations§
Source§impl SkillHttpTool
impl SkillHttpTool
Sourcepub fn new(skill_name: &str, tool: &SkillTool) -> SkillHttpTool
pub fn new(skill_name: &str, tool: &SkillTool) -> SkillHttpTool
Create a new skill HTTP tool.
The tool name is prefixed with the skill name (skill_name__tool_name)
to prevent collisions with built-in tools.
Trait Implementations§
Source§impl Attributable for SkillHttpTool
impl Attributable for SkillHttpTool
Source§impl Tool for SkillHttpTool
impl Tool for SkillHttpTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON schema for parameters
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SkillHttpTool: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SkillHttpTool: 'async_trait,
Execute the tool with given arguments
Source§fn output_schema(&self) -> Option<Value>
fn output_schema(&self) -> Option<Value>
JSON schema describing the structured output this tool attaches to
ToolOutput::data, when it declares one. None means the tool
emits display text only; authoring surfaces fall back to
sample-derived shapes from captured runs.Source§fn param_domains(&self) -> Vec<(&'static str, OptionDomain)>
fn param_domains(&self) -> Vec<(&'static str, OptionDomain)>
Option domains for parameters whose value sets live in runtime
config rather than the static schema (channel refs, peer targets,
…). Surfaces resolve these through the runtime to render real
selectable choices. Default: no domain-typed parameters.
fn spec(&self) -> ToolSpec
Auto Trait Implementations§
impl Freeze for SkillHttpTool
impl RefUnwindSafe for SkillHttpTool
impl Send for SkillHttpTool
impl Sync for SkillHttpTool
impl Unpin for SkillHttpTool
impl UnsafeUnpin for SkillHttpTool
impl UnwindSafe for SkillHttpTool
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more