pub struct OpenAIProvider { /* private fields */ }Implementations§
Trait Implementations§
Source§impl LLMProvider for OpenAIProvider
impl LLMProvider for OpenAIProvider
Source§fn context_route(&self) -> Value
fn context_route(&self) -> Value
Stable, credential-free route evidence used to freeze Context execution identity.
Custom providers may override this with their model, protocol and endpoint identity.
Source§fn runtime_policy(&self) -> RuntimePolicy
fn runtime_policy(&self) -> RuntimePolicy
Per-model runtime policy. Overridden by RuntimeOptions fields when set.
Source§fn prepare_context_request(
&self,
context: &InternalRenderedContext,
tools: &[ToolSchema],
extensions: Option<&Value>,
_state: Option<&ProviderRunState>,
) -> Result<Value>
fn prepare_context_request( &self, context: &InternalRenderedContext, tools: &[ToolSchema], extensions: Option<&Value>, _state: Option<&ProviderRunState>, ) -> Result<Value>
Freeze the material covered by a Context request fingerprint before I/O.
The default scope is logical adapter input. Providers with hidden encoding state must
override this and
stream_prepared to consume the same frozen encoded request.fn stream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 InternalRenderedContext,
tools: &'life2 [ToolSchema],
extensions: Option<&'life3 Value>,
state: Option<&'life4 ProviderRunState>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Stream<Item = Result<StreamEvent>> + Send + Unpin>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn stream_prepared<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
prepared: &'life1 Value,
_context: &'life2 InternalRenderedContext,
_tools: &'life3 [ToolSchema],
_extensions: Option<&'life4 Value>,
_state: Option<&'life5 ProviderRunState>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Stream<Item = Result<StreamEvent>> + Send + Unpin>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn stream_prepared<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
prepared: &'life1 Value,
_context: &'life2 InternalRenderedContext,
_tools: &'life3 [ToolSchema],
_extensions: Option<&'life4 Value>,
_state: Option<&'life5 ProviderRunState>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Stream<Item = Result<StreamEvent>> + Send + Unpin>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Dispatch previously frozen material. The default supports stateless logical adapters;
encoded-request providers override this to avoid re-encoding after evidence is recorded.
Source§fn create_run_state(&self) -> Option<ProviderRunState>
fn create_run_state(&self) -> Option<ProviderRunState>
Optional per-run state for protocol-native continuation (e.g. Responses API).
fn peek_provider_replay( &self, _content: &str, _tool_calls: &[ToolCall], ) -> Option<ProviderReplay>
fn seed_provider_replay( &self, _content: &str, _tool_calls: &[ToolCall], _replay: &ProviderReplay, )
fn commit_stream_replay(&self, _content: &str, _tool_calls: &[ToolCall])
Source§fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 InternalRenderedContext,
tools: &'life2 [ToolSchema],
extensions: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<CoreMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 InternalRenderedContext,
tools: &'life2 [ToolSchema],
extensions: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<CoreMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Non-streaming completion — default collects from
stream.Auto Trait Implementations§
impl !RefUnwindSafe for OpenAIProvider
impl !UnwindSafe for OpenAIProvider
impl Freeze for OpenAIProvider
impl Send for OpenAIProvider
impl Sync for OpenAIProvider
impl Unpin for OpenAIProvider
impl UnsafeUnpin for OpenAIProvider
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