#[non_exhaustive]pub struct FunctionResponse {
pub name: String,
pub response: Option<Struct>,
pub parts: Vec<FunctionResponsePart>,
/* private fields */
}Available on crate features
data-foundry-service or gen-ai-cache-service or gen-ai-tuning-service or llm-utility-service or prediction-service or vertex-rag-service only.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.
parts: Vec<FunctionResponsePart>Optional. Ordered Parts that constitute a function response. Parts may
have different IANA MIME types.
Implementations§
Trait Implementations§
Source§impl Clone for FunctionResponse
impl Clone for FunctionResponse
Source§fn clone(&self) -> FunctionResponse
fn clone(&self) -> FunctionResponse
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 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 Message for FunctionResponse
impl Message for FunctionResponse
Source§impl PartialEq for FunctionResponse
impl PartialEq 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