#[non_exhaustive]pub struct FunctionResponse {
pub name: String,
pub response: Option<Struct>,
/* private fields */
}Expand description
The result output from a FunctionCall that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction.
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.name: StringRequired. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
response: Option<Struct>Required. The function response in JSON object format. Use “output” key to specify function output and “error” key to specify error details (if any). If “output” and “error” keys are not specified, then whole “response” is treated as function output.
Implementations§
Trait Implementations§
Source§impl Clone for FunctionResponse
impl Clone for FunctionResponse
Source§fn clone(&self) -> FunctionResponse
fn clone(&self) -> FunctionResponse
Returns a copy 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 FunctionResponse
impl Debug for FunctionResponse
Source§impl Default for FunctionResponse
impl Default for FunctionResponse
Source§fn default() -> FunctionResponse
fn default() -> FunctionResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionResponsewhere
FunctionResponse: Default,
impl<'de> Deserialize<'de> for FunctionResponsewhere
FunctionResponse: Default,
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 Message for FunctionResponse
impl Message for FunctionResponse
Source§impl PartialEq for FunctionResponse
impl PartialEq for FunctionResponse
Source§impl Serialize for FunctionResponse
impl Serialize for FunctionResponse
impl StructuralPartialEq for FunctionResponse
Auto Trait Implementations§
impl Freeze for FunctionResponse
impl RefUnwindSafe for FunctionResponse
impl Send for FunctionResponse
impl Sync for FunctionResponse
impl Unpin for FunctionResponse
impl UnwindSafe for FunctionResponse
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