#[non_exhaustive]pub struct ThinkingConfig {
pub include_thoughts: Option<bool>,
pub thinking_budget: Option<i32>,
pub thinking_level: Option<ThinkingLevel>,
/* private fields */
}Available on crate features
gen-ai-tuning-service or llm-utility-service or prediction-service only.Expand description
Config for thinking features.
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.include_thoughts: Option<bool>Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.
thinking_budget: Option<i32>Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true.
thinking_level: Option<ThinkingLevel>Optional. The number of thoughts tokens that the model should generate.
Implementations§
Source§impl ThinkingConfig
impl ThinkingConfig
Sourcepub fn set_include_thoughts<T>(self, v: T) -> Self
pub fn set_include_thoughts<T>(self, v: T) -> Self
Sets the value of include_thoughts.
§Example
ⓘ
let x = ThinkingConfig::new().set_include_thoughts(true);Sourcepub fn set_or_clear_include_thoughts<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_include_thoughts<T>(self, v: Option<T>) -> Self
Sets or clears the value of include_thoughts.
§Example
ⓘ
let x = ThinkingConfig::new().set_or_clear_include_thoughts(Some(false));
let x = ThinkingConfig::new().set_or_clear_include_thoughts(None::<bool>);Sourcepub fn set_thinking_budget<T>(self, v: T) -> Self
pub fn set_thinking_budget<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_thinking_budget<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_thinking_budget<T>(self, v: Option<T>) -> Self
Sets or clears the value of thinking_budget.
§Example
ⓘ
let x = ThinkingConfig::new().set_or_clear_thinking_budget(Some(42));
let x = ThinkingConfig::new().set_or_clear_thinking_budget(None::<i32>);Sourcepub fn set_thinking_level<T>(self, v: T) -> Selfwhere
T: Into<ThinkingLevel>,
pub fn set_thinking_level<T>(self, v: T) -> Selfwhere
T: Into<ThinkingLevel>,
Sets the value of thinking_level.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::generation_config::thinking_config::ThinkingLevel;
let x0 = ThinkingConfig::new().set_thinking_level(ThinkingLevel::Low);
let x1 = ThinkingConfig::new().set_thinking_level(ThinkingLevel::Medium);
let x2 = ThinkingConfig::new().set_thinking_level(ThinkingLevel::High);Sourcepub fn set_or_clear_thinking_level<T>(self, v: Option<T>) -> Selfwhere
T: Into<ThinkingLevel>,
pub fn set_or_clear_thinking_level<T>(self, v: Option<T>) -> Selfwhere
T: Into<ThinkingLevel>,
Sets or clears the value of thinking_level.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::generation_config::thinking_config::ThinkingLevel;
let x0 = ThinkingConfig::new().set_or_clear_thinking_level(Some(ThinkingLevel::Low));
let x1 = ThinkingConfig::new().set_or_clear_thinking_level(Some(ThinkingLevel::Medium));
let x2 = ThinkingConfig::new().set_or_clear_thinking_level(Some(ThinkingLevel::High));
let x_none = ThinkingConfig::new().set_or_clear_thinking_level(None::<ThinkingLevel>);Trait Implementations§
Source§impl Clone for ThinkingConfig
impl Clone for ThinkingConfig
Source§fn clone(&self) -> ThinkingConfig
fn clone(&self) -> ThinkingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThinkingConfig
impl Debug for ThinkingConfig
Source§impl Default for ThinkingConfig
impl Default for ThinkingConfig
Source§fn default() -> ThinkingConfig
fn default() -> ThinkingConfig
Returns the “default value” for a type. Read more
Source§impl Message for ThinkingConfig
impl Message for ThinkingConfig
Source§impl PartialEq for ThinkingConfig
impl PartialEq for ThinkingConfig
impl StructuralPartialEq for ThinkingConfig
Auto Trait Implementations§
impl Freeze for ThinkingConfig
impl RefUnwindSafe for ThinkingConfig
impl Send for ThinkingConfig
impl Sync for ThinkingConfig
impl Unpin for ThinkingConfig
impl UnsafeUnpin for ThinkingConfig
impl UnwindSafe for ThinkingConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request