pub struct RealtimeSession { /* private fields */ }Implementations§
Source§impl RealtimeSession
impl RealtimeSession
pub fn new( id: String, ws: Arc<Client<WebsocketHandle>>, ) -> (Arc<Self>, UnboundedReceiver<Vec<u8>>)
Sourcepub fn session_update(&self, session: SessionUpdateEvent) -> Result<()>
pub fn session_update(&self, session: SessionUpdateEvent) -> Result<()>
Updates the session See: https://platform.openai.com/docs/api-reference/realtime-client-events/session/update
Sourcepub fn response_create(&self, response: ResponseCreateEvent) -> Result<()>
pub fn response_create(&self, response: ResponseCreateEvent) -> Result<()>
This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically. See: https://platform.openai.com/docs/api-reference/realtime-client-events/response/create
pub fn audio_append(&self, buffer: Vec<u8>) -> Result<()>
Auto Trait Implementations§
impl !Freeze for RealtimeSession
impl !RefUnwindSafe for RealtimeSession
impl Send for RealtimeSession
impl Sync for RealtimeSession
impl Unpin for RealtimeSession
impl !UnwindSafe for RealtimeSession
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