#[non_exhaustive]pub struct FunctionResponseBlob {
pub mime_type: String,
pub data: Bytes,
pub display_name: String,
/* 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
Raw media bytes for function response.
Text should not be sent as raw bytes, use the ‘text’ field.
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.mime_type: StringRequired. The IANA standard MIME type of the source data.
data: BytesRequired. Raw bytes.
display_name: StringOptional. Display name of the blob.
Used to provide a label or filename to distinguish blobs.
This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
Implementations§
Source§impl FunctionResponseBlob
impl FunctionResponseBlob
pub fn new() -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
ⓘ
let x = FunctionResponseBlob::new().set_display_name("example");Trait Implementations§
Source§impl Clone for FunctionResponseBlob
impl Clone for FunctionResponseBlob
Source§fn clone(&self) -> FunctionResponseBlob
fn clone(&self) -> FunctionResponseBlob
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 FunctionResponseBlob
impl Debug for FunctionResponseBlob
Source§impl Default for FunctionResponseBlob
impl Default for FunctionResponseBlob
Source§fn default() -> FunctionResponseBlob
fn default() -> FunctionResponseBlob
Returns the “default value” for a type. Read more
Source§impl Message for FunctionResponseBlob
impl Message for FunctionResponseBlob
Source§impl PartialEq for FunctionResponseBlob
impl PartialEq for FunctionResponseBlob
impl StructuralPartialEq for FunctionResponseBlob
Auto Trait Implementations§
impl !Freeze for FunctionResponseBlob
impl RefUnwindSafe for FunctionResponseBlob
impl Send for FunctionResponseBlob
impl Sync for FunctionResponseBlob
impl Unpin for FunctionResponseBlob
impl UnwindSafe for FunctionResponseBlob
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