pub struct OpenAIBackendConfig {
pub base_url: String,
pub auth_token: String,
pub max_output_tokens: Option<usize>,
pub debug_dump_api_requests: bool,
pub max_request_bytes: usize,
pub retry: RetryPolicy,
pub effort: Option<Effort>,
}Expand description
Settings for either OpenAI dialect (BackendConfig::OpenAIResponses /
BackendConfig::OpenAICompletions).
Fields§
§base_url: StringBase URL including any path prefix, e.g. https://api.x.ai/v1 or
http://localhost:11434/v1.
auth_token: String§max_output_tokens: Option<usize>§debug_dump_api_requests: bool§max_request_bytes: usizeMaximum serialized request body, including history, images, tools, and prompts.
retry: RetryPolicyTransient-failure retry for this endpoint ([gateways.NAME.retry]).
effort: Option<Effort>When set, request provider reasoning at this effort.
Sent as reasoning.effort (Responses) or reasoning_effort (Chat
Completions). Servers that predate the field ignore it; OpenAI rejects
it on non-reasoning models, so those need thinking = "none" in the
catalog. Defaults to Effort::DEFAULT so reasoning is always requested.
Trait Implementations§
Source§impl Clone for OpenAIBackendConfig
impl Clone for OpenAIBackendConfig
Source§fn clone(&self) -> OpenAIBackendConfig
fn clone(&self) -> OpenAIBackendConfig
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 OpenAIBackendConfig
impl Debug for OpenAIBackendConfig
Source§impl Default for OpenAIBackendConfig
impl Default for OpenAIBackendConfig
Source§impl<'de> Deserialize<'de> for OpenAIBackendConfig
impl<'de> Deserialize<'de> for OpenAIBackendConfig
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 OpenAIBackendConfig
impl RefUnwindSafe for OpenAIBackendConfig
impl Send for OpenAIBackendConfig
impl Sync for OpenAIBackendConfig
impl Unpin for OpenAIBackendConfig
impl UnsafeUnpin for OpenAIBackendConfig
impl UnwindSafe for OpenAIBackendConfig
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