pub struct OpenAIReasoningConfig { /* private fields */ }Expand description
Exact OpenAI reasoning and closely related response controls.
Every field is optional. Self::new therefore preserves the model’s
server-side defaults until a builder is called.
Implementations§
Source§impl OpenAIReasoningConfig
impl OpenAIReasoningConfig
Sourcepub const fn with_effort(self, effort: OpenAIReasoningEffort) -> Self
pub const fn with_effort(self, effort: OpenAIReasoningEffort) -> Self
Set the exact reasoning effort.
Sourcepub const fn with_mode(self, mode: OpenAIReasoningMode) -> Self
pub const fn with_mode(self, mode: OpenAIReasoningMode) -> Self
Set the GPT-5.6 reasoning execution mode.
Sourcepub const fn with_context(self, context: OpenAIReasoningContext) -> Self
pub const fn with_context(self, context: OpenAIReasoningContext) -> Self
Select which persisted reasoning context the Responses API may reuse.
Sourcepub const fn with_summary(self, summary: OpenAIReasoningSummary) -> Self
pub const fn with_summary(self, summary: OpenAIReasoningSummary) -> Self
Request a user-visible reasoning summary.
Sourcepub const fn with_verbosity(self, verbosity: OpenAITextVerbosity) -> Self
pub const fn with_verbosity(self, verbosity: OpenAITextVerbosity) -> Self
Set final-answer verbosity.
Sourcepub const fn with_api_surface(self, api_surface: OpenAIApiSurface) -> Self
pub const fn with_api_surface(self, api_surface: OpenAIApiSurface) -> Self
Select the API surface used by the general OpenAI provider.
Sourcepub const fn with_prompt_cache_mode(
self,
prompt_cache_mode: OpenAIPromptCacheMode,
) -> Self
pub const fn with_prompt_cache_mode( self, prompt_cache_mode: OpenAIPromptCacheMode, ) -> Self
Select implicit or explicit prompt-cache breakpoint creation.
Sourcepub const fn with_prompt_cache_ttl(
self,
prompt_cache_ttl: OpenAIPromptCacheTtl,
) -> Self
pub const fn with_prompt_cache_ttl( self, prompt_cache_ttl: OpenAIPromptCacheTtl, ) -> Self
Set GPT-5.6’s exact prompt-cache retention window.
Sourcepub const fn with_store(self, store: bool) -> Self
pub const fn with_store(self, store: bool) -> Self
Select whether OpenAI stores the response as application state.
Sourcepub const fn with_parallel_tool_calls(self, enabled: bool) -> Self
pub const fn with_parallel_tool_calls(self, enabled: bool) -> Self
Enable or disable parallel function calls.
Sourcepub fn with_tool_choice(self, tool_choice: OpenAIToolChoice) -> Self
pub fn with_tool_choice(self, tool_choice: OpenAIToolChoice) -> Self
Set the complete OpenAI function-tool choice policy.
Sourcepub fn with_safety_identifier(
self,
safety_identifier: impl Into<String>,
) -> Self
pub fn with_safety_identifier( self, safety_identifier: impl Into<String>, ) -> Self
Set a stable, privacy-preserving identifier for end-user safety controls.
Sourcepub const fn effort(&self) -> Option<OpenAIReasoningEffort>
pub const fn effort(&self) -> Option<OpenAIReasoningEffort>
Configured exact reasoning effort, if any.
Sourcepub const fn mode(&self) -> Option<OpenAIReasoningMode>
pub const fn mode(&self) -> Option<OpenAIReasoningMode>
Configured reasoning execution mode, if any.
Sourcepub const fn context(&self) -> Option<OpenAIReasoningContext>
pub const fn context(&self) -> Option<OpenAIReasoningContext>
Configured persisted-reasoning context policy, if any.
Sourcepub const fn summary(&self) -> Option<OpenAIReasoningSummary>
pub const fn summary(&self) -> Option<OpenAIReasoningSummary>
Configured reasoning summary detail, if any.
Sourcepub const fn verbosity(&self) -> Option<OpenAITextVerbosity>
pub const fn verbosity(&self) -> Option<OpenAITextVerbosity>
Configured final-answer verbosity, if any.
Sourcepub const fn api_surface(&self) -> OpenAIApiSurface
pub const fn api_surface(&self) -> OpenAIApiSurface
Selected API surface.
Sourcepub const fn prompt_cache_mode(&self) -> Option<OpenAIPromptCacheMode>
pub const fn prompt_cache_mode(&self) -> Option<OpenAIPromptCacheMode>
Configured prompt-cache mode, if any.
Sourcepub const fn prompt_cache_ttl(&self) -> Option<OpenAIPromptCacheTtl>
pub const fn prompt_cache_ttl(&self) -> Option<OpenAIPromptCacheTtl>
Configured exact prompt-cache TTL, if any.
Sourcepub const fn parallel_tool_calls(&self) -> Option<bool>
pub const fn parallel_tool_calls(&self) -> Option<bool>
Explicit parallel-tool preference, if configured.
Sourcepub const fn tool_choice(&self) -> Option<&OpenAIToolChoice>
pub const fn tool_choice(&self) -> Option<&OpenAIToolChoice>
Provider-owned tool-choice policy, if configured.
Sourcepub fn safety_identifier(&self) -> Option<&str>
pub fn safety_identifier(&self) -> Option<&str>
Stable safety identifier, if configured.
Sourcepub const fn requires_responses_api(&self) -> bool
pub const fn requires_responses_api(&self) -> bool
Whether this config uses controls that only the Responses API accepts.
Trait Implementations§
Source§impl Clone for OpenAIReasoningConfig
impl Clone for OpenAIReasoningConfig
Source§fn clone(&self) -> OpenAIReasoningConfig
fn clone(&self) -> OpenAIReasoningConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OpenAIReasoningConfig
impl Debug for OpenAIReasoningConfig
Source§impl Default for OpenAIReasoningConfig
impl Default for OpenAIReasoningConfig
Source§fn default() -> OpenAIReasoningConfig
fn default() -> OpenAIReasoningConfig
impl Eq for OpenAIReasoningConfig
Source§impl PartialEq for OpenAIReasoningConfig
impl PartialEq for OpenAIReasoningConfig
impl StructuralPartialEq for OpenAIReasoningConfig
Auto Trait Implementations§
impl Freeze for OpenAIReasoningConfig
impl RefUnwindSafe for OpenAIReasoningConfig
impl Send for OpenAIReasoningConfig
impl Sync for OpenAIReasoningConfig
impl Unpin for OpenAIReasoningConfig
impl UnsafeUnpin for OpenAIReasoningConfig
impl UnwindSafe for OpenAIReasoningConfig
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.