pub struct ResponsesClient<T>where
T: Transport,{
pub model_name: String,
pub api_key: String,
pub scheme: String,
pub host: String,
pub base_path: String,
pub transport: T,
pub extra_tool_declarations: Vec<Value>,
pub reasoning_effort: Option<String>,
pub use_previous_response_id: bool,
pub store: Option<bool>,
pub meta: ProviderMeta,
/* private fields */
}Expand description
Generic client over the OpenAI Responses API wire format
(POST {base_url}/responses). Provider wrappers like
[chat_openai] hold one of these as their inner state.
Fields§
§model_name: String§api_key: String§scheme: String§host: String§base_path: String§transport: T§extra_tool_declarations: Vec<Value>Tool declarations injected by the wrapping provider on top of the
ToolDeclarations view supplied by Chat. The wire layer drops
these into tools[] opaquely — it does not know about
OpenAINativeTool or any provider-specific trait.
reasoning_effort: Option<String>§use_previous_response_id: bool§store: Option<bool>§meta: ProviderMetaTrait Implementations§
Source§impl<T> CompletionProvider for ResponsesClient<T>where
T: Transport,
impl<T> CompletionProvider for ResponsesClient<T>where
T: Transport,
Source§fn complete<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
messages: &'life1 mut Messages,
tool_declarations: Option<&'life2 dyn ToolDeclarations>,
options: Option<&'life3 ChatOptions>,
structured_output: Option<&'life4 Schema>,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, ChatFailure>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
ResponsesClient<T>: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
messages: &'life1 mut Messages,
tool_declarations: Option<&'life2 dyn ToolDeclarations>,
options: Option<&'life3 ChatOptions>,
structured_output: Option<&'life4 Schema>,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, ChatFailure>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
ResponsesClient<T>: 'async_trait,
Run one completion step. Read more
fn metadata(&self) -> Option<&ProviderMeta>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ResponsesClient<T>
impl<T> !UnwindSafe for ResponsesClient<T>
impl<T> Freeze for ResponsesClient<T>where
T: Freeze,
impl<T> Send for ResponsesClient<T>
impl<T> Sync for ResponsesClient<T>
impl<T> Unpin for ResponsesClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for ResponsesClient<T>where
T: UnsafeUnpin,
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