pub struct GenerateContentRequest {
pub contents: Vec<Content>,
pub generation_config: Option<GenerationConfig>,
pub safety_settings: Option<Vec<SafetySetting>>,
pub tools: Option<Vec<Tool>>,
pub tool_config: Option<ToolConfig>,
pub system_instruction: Option<Content>,
}
Expand description
Request to generate content
Fields§
§contents: Vec<Content>
The contents to generate content from
generation_config: Option<GenerationConfig>
The generation config
safety_settings: Option<Vec<SafetySetting>>
The safety settings
tools: Option<Vec<Tool>>
The tools that the model can use
tool_config: Option<ToolConfig>
The tool config
system_instruction: Option<Content>
The system instruction
Trait Implementations§
Source§impl Clone for GenerateContentRequest
impl Clone for GenerateContentRequest
Source§fn clone(&self) -> GenerateContentRequest
fn clone(&self) -> GenerateContentRequest
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 GenerateContentRequest
impl Debug for GenerateContentRequest
Source§impl<'de> Deserialize<'de> for GenerateContentRequest
impl<'de> Deserialize<'de> for GenerateContentRequest
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
Auto Trait Implementations§
impl Freeze for GenerateContentRequest
impl RefUnwindSafe for GenerateContentRequest
impl Send for GenerateContentRequest
impl Sync for GenerateContentRequest
impl Unpin for GenerateContentRequest
impl UnwindSafe for GenerateContentRequest
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