pub struct ToolDefinition {
pub name: String,
pub description: String,
pub parameters: Value,
}
Fields§
§name: String
§description: String
§parameters: Value
Trait Implementations§
Source§impl Clone for ToolDefinition
impl Clone for ToolDefinition
Source§fn clone(&self) -> ToolDefinition
fn clone(&self) -> ToolDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ToolDefinition
impl Debug for ToolDefinition
Source§impl<'de> Deserialize<'de> for ToolDefinition
impl<'de> Deserialize<'de> for ToolDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Tool> for ToolDefinition
Available on crate feature rmcp
only.
impl From<&Tool> for ToolDefinition
Available on crate feature
rmcp
only.Source§impl From<Tool> for ToolDefinition
Available on crate feature rmcp
only.
impl From<Tool> for ToolDefinition
Available on crate feature
rmcp
only.Source§impl From<ToolDefinition> for ResponsesToolDefinition
impl From<ToolDefinition> for ResponsesToolDefinition
Source§fn from(value: ToolDefinition) -> Self
fn from(value: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for Tool
impl From<ToolDefinition> for Tool
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
Convert internal ToolDefinition (from the completion module) into Ollama’s tool definition.
impl From<ToolDefinition> for ToolDefinition
Convert internal ToolDefinition (from the completion module) into Ollama’s tool definition.
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ToolDefinition> for ToolDefinition
impl From<ToolDefinition> for ToolDefinition
Source§fn from(tool: ToolDefinition) -> Self
fn from(tool: ToolDefinition) -> Self
Converts to this type from the input type.
Source§impl Serialize for ToolDefinition
impl Serialize for ToolDefinition
Source§impl TryFrom<ToolDefinition> for Tool
impl TryFrom<ToolDefinition> for Tool
Source§type Error = CompletionError
type Error = CompletionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ToolDefinition
impl RefUnwindSafe for ToolDefinition
impl Send for ToolDefinition
impl Sync for ToolDefinition
impl Unpin for ToolDefinition
impl UnwindSafe for ToolDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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