pub struct ModelInformation {
pub name: String,
pub version: String,
pub display_name: String,
pub description: String,
pub input_token_limit: i32,
pub output_token_limit: i32,
pub supported_generation_methods: Vec<String>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<i32>,
}Expand description
Captures the information for a specific Google generative AI model.
{
"name": "models/gemini-pro",
"version": "001",
"displayName": "Gemini Pro",
"description": "The best model for scaling across a wide range of tasks",
"inputTokenLimit": 30720,
"outputTokenLimit": 2048,
"supportedGenerationMethods": [
"generateContent",
"countTokens"
],
"temperature": 0.9,
"topP": 1,
"topK": 100,
}Fields§
§name: String§version: String§display_name: String§description: String§input_token_limit: i32§output_token_limit: i32§supported_generation_methods: Vec<String>§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<i32>Trait Implementations§
Source§impl Debug for ModelInformation
impl Debug for ModelInformation
Source§impl Default for ModelInformation
impl Default for ModelInformation
Source§fn default() -> ModelInformation
fn default() -> ModelInformation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelInformation
impl<'de> Deserialize<'de> for ModelInformation
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 ModelInformation
impl RefUnwindSafe for ModelInformation
impl Send for ModelInformation
impl Sync for ModelInformation
impl Unpin for ModelInformation
impl UnwindSafe for ModelInformation
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