#[non_exhaustive]pub struct ToolCall {
pub tool_display_name: String,
pub tool_display_details: String,
pub action: String,
pub input_parameters: Option<Struct>,
pub create_time: Option<Timestamp>,
pub answer_record: String,
pub state: State,
pub source: Option<Source>,
/* private fields */
}Available on crate features
answer-records or conversations or generator-evaluations or generators or participants only.Expand description
Represents a call of a specific tool’s action with the specified inputs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tool_display_name: StringOptional. A human readable short name of the tool, to be shown on the UI.
tool_display_details: StringOptional. A human readable description of the tool.
action: StringOptional. The name of the tool’s action associated with this call.
input_parameters: Option<Struct>Optional. The action’s input parameters.
create_time: Option<Timestamp>Output only. Create time of the tool call.
answer_record: StringOptional. The answer record associated with this tool call.
state: StateOutput only. State of the tool call.
source: Option<Source>Specifies the source of this tool call.
Implementations§
Source§impl ToolCall
impl ToolCall
pub fn new() -> Self
Sourcepub fn set_tool_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_tool_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of tool_display_name.
§Example
ⓘ
let x = ToolCall::new().set_tool_display_name("example");Sourcepub fn set_tool_display_details<T: Into<String>>(self, v: T) -> Self
pub fn set_tool_display_details<T: Into<String>>(self, v: T) -> Self
Sets the value of tool_display_details.
§Example
ⓘ
let x = ToolCall::new().set_tool_display_details("example");Sourcepub fn set_action<T: Into<String>>(self, v: T) -> Self
pub fn set_action<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_input_parameters<T>(self, v: T) -> Self
pub fn set_input_parameters<T>(self, v: T) -> Self
Sets the value of input_parameters.
§Example
ⓘ
use wkt::Struct;
let x = ToolCall::new().set_input_parameters(Struct::default()/* use setters */);Sourcepub fn set_or_clear_input_parameters<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_input_parameters<T>(self, v: Option<T>) -> Self
Sets or clears the value of input_parameters.
§Example
ⓘ
use wkt::Struct;
let x = ToolCall::new().set_or_clear_input_parameters(Some(Struct::default()/* use setters */));
let x = ToolCall::new().set_or_clear_input_parameters(None::<Struct>);Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ToolCall::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ToolCall::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = ToolCall::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
pub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for ToolCall
Auto Trait Implementations§
impl Freeze for ToolCall
impl RefUnwindSafe for ToolCall
impl Send for ToolCall
impl Sync for ToolCall
impl Unpin for ToolCall
impl UnsafeUnpin for ToolCall
impl UnwindSafe for ToolCall
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