pub struct OpenAiChatRealtime { /* private fields */ }
Expand description
OpenAI‑compatible Chat Completions streaming client (SSE, stream=true).
Construct with the prompt/messages to stream and then call start_stream
.
Implementations§
Source§impl OpenAiChatRealtime
impl OpenAiChatRealtime
pub fn new_with_messages(config: Config, messages: Vec<Value>) -> Self
pub fn new_simple(config: Config, prompt: &str) -> Self
Trait Implementations§
Source§impl Realtime for OpenAiChatRealtime
impl Realtime for OpenAiChatRealtime
Source§fn start_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn StreamItem>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn StreamItem>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start a streaming session and return a handle that yields streamed text deltas.
Auto Trait Implementations§
impl Freeze for OpenAiChatRealtime
impl !RefUnwindSafe for OpenAiChatRealtime
impl Send for OpenAiChatRealtime
impl Sync for OpenAiChatRealtime
impl Unpin for OpenAiChatRealtime
impl !UnwindSafe for OpenAiChatRealtime
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