Skip to main content

ResponsesBuilder

Struct ResponsesBuilder 

Source
pub struct ResponsesBuilder<M = WithoutModel, U = WithoutUrl, T: Transport = ReqwestTransport> { /* private fields */ }

Implementations§

Source§

impl ResponsesBuilder<WithoutModel, WithoutUrl, ReqwestTransport>

Source

pub fn new() -> Self

Source§

impl<M, U, T: Transport> ResponsesBuilder<M, U, T>

Source

pub fn with_api_key(self, api_key: impl Into<String>) -> Self

Source

pub fn with_reasoning_effort(self, effort: impl Into<String>) -> Self

Source

pub fn without_previous_response_id(self) -> Self

Source

pub fn with_store(self, store: bool) -> Self

Source

pub fn with_description(self, description: impl Into<String>) -> Self

Source

pub fn with_metadata( self, key: impl Into<String>, value: impl Any + Send + Sync + 'static, ) -> Self

Source

pub fn with_meta(self, meta: ProviderMeta) -> Self

Replace the whole ProviderMeta. Useful for wrappers that accumulate metadata on their own builder and want to pass it through wholesale at construction time.

Source

pub fn with_tool_declaration(self, declaration: Value) -> Self

Append a single pre-materialized tool declaration. Wrappers use this to inject their provider-specific native tools without coupling the wire layer to a NativeTool trait.

Source

pub fn with_tool_declarations( self, declarations: impl IntoIterator<Item = Value>, ) -> Self

Source

pub fn with_transport<T2: Transport>( self, transport: T2, ) -> ResponsesBuilder<M, U, T2>

Source§

impl<U, T: Transport> ResponsesBuilder<WithoutModel, U, T>

Source

pub fn with_model( self, model: impl Into<String>, ) -> ResponsesBuilder<WithModel, U, T>

Source§

impl<M, T: Transport> ResponsesBuilder<M, WithoutUrl, T>

Source

pub fn with_base_url( self, url: impl Into<String>, ) -> ResponsesBuilder<M, WithUrl, T>

Source§

impl<T: Transport> ResponsesBuilder<WithModel, WithUrl, T>

Source

pub fn build(self) -> ResponsesClient<T>

Trait Implementations§

Source§

impl Default for ResponsesBuilder<WithoutModel, WithoutUrl, ReqwestTransport>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<M = WithoutModel, U = WithoutUrl, T = ReqwestTransport> !RefUnwindSafe for ResponsesBuilder<M, U, T>

§

impl<M = WithoutModel, U = WithoutUrl, T = ReqwestTransport> !UnwindSafe for ResponsesBuilder<M, U, T>

§

impl<M, U, T> Freeze for ResponsesBuilder<M, U, T>
where T: Freeze,

§

impl<M, U, T> Send for ResponsesBuilder<M, U, T>
where M: Send, U: Send,

§

impl<M, U, T> Sync for ResponsesBuilder<M, U, T>
where M: Sync, U: Sync,

§

impl<M, U, T> Unpin for ResponsesBuilder<M, U, T>
where T: Unpin, M: Unpin, U: Unpin,

§

impl<M, U, T> UnsafeUnpin for ResponsesBuilder<M, U, T>
where T: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<M> MetaArg<M> for M

Source§

fn into_meta(self) -> M

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more