Struct OpenAiResponsesBuilder
pub struct OpenAiResponsesBuilder { /* private fields */ }Expand description
Typed builder for OpenAiResponsesModelProvider.
Only alias is required. api_url defaults to the OpenAI Responses
endpoint; if a custom URL is supplied, /responses is appended when
not already present so callers can pass either shape. Every runtime
override (timeout_secs / max_tokens / reasoning_effort /
extra_headers) is set via a chain method on this builder before
Self::build — the built provider itself has no post-construction
mutators.
Implementations§
Source§impl OpenAiResponsesBuilder
impl OpenAiResponsesBuilder
Sourcepub fn api_url(self, api_url: &str) -> Self
pub fn api_url(self, api_url: &str) -> Self
Override the API endpoint. The /responses suffix is appended
automatically if the input does not already end in it.
Sourcepub fn credential(self, credential: Option<&str>) -> Self
pub fn credential(self, credential: Option<&str>) -> Self
Explicit API credential. Whitespace-only inputs collapse to
None.
pub fn max_tokens(self, max_tokens: Option<u32>) -> Self
pub fn reasoning_effort(self, reasoning_effort: Option<String>) -> Self
Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Override the non-streaming HTTP request timeout. Values of 0 are
ignored (the default 120 s is kept) so a stray Some(0) from
config cannot silently disable the safety timeout — same guard
applied by OpenAiBuilder::timeout_secs,
crate::compatible::OpenAiCompatibleBuilder::timeout_secs, and
crate::openrouter::OpenRouterBuilder::timeout_secs.
Sourcepub fn extra_headers(self, headers: HashMap<String, String>) -> Self
pub fn extra_headers(self, headers: HashMap<String, String>) -> Self
Set extra HTTP headers to include on every request. Reserved
keys (e.g. Authorization) are dropped at request-build time —
see OpenAiResponsesModelProvider for details.
pub fn build(self) -> OpenAiResponsesModelProvider
Auto Trait Implementations§
impl Freeze for OpenAiResponsesBuilder
impl RefUnwindSafe for OpenAiResponsesBuilder
impl Send for OpenAiResponsesBuilder
impl Sync for OpenAiResponsesBuilder
impl Unpin for OpenAiResponsesBuilder
impl UnsafeUnpin for OpenAiResponsesBuilder
impl UnwindSafe for OpenAiResponsesBuilder
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more