pub struct GoogleRealtimeModel { /* private fields */ }Expand description
Live API realtime model.
Implementations§
Source§impl GoogleRealtimeModel
impl GoogleRealtimeModel
Sourcepub fn new(config: SharedConfig, model_id: impl Into<ModelId>) -> Self
pub fn new(config: SharedConfig, model_id: impl Into<ModelId>) -> Self
Creates the model.
Sourcepub fn session_url(&self) -> Url
pub fn session_url(&self) -> Url
WebSocket URL of the constrained bidi endpoint (without the token).
Trait Implementations§
Source§impl Debug for GoogleRealtimeModel
impl Debug for GoogleRealtimeModel
Source§impl RealtimeModel for GoogleRealtimeModel
impl RealtimeModel for GoogleRealtimeModel
Source§fn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
Provider identifier.
Source§async fn do_create_client_secret(
&self,
options: ClientSecretOptions,
) -> Result<ClientSecret, ProviderError>
async fn do_create_client_secret( &self, options: ClientSecretOptions, ) -> Result<ClientSecret, ProviderError>
Creates a short-lived client secret for opening a session.
Source§fn websocket_config(&self, token: &str, url: &Url) -> WebSocketConfig
fn websocket_config(&self, token: &str, url: &Url) -> WebSocketConfig
Returns the WebSocket URL and sub-protocols for a token.
Source§fn parse_server_event(
&self,
raw: JsonValue,
) -> Result<Vec<RealtimeServerEvent>, ProviderError>
fn parse_server_event( &self, raw: JsonValue, ) -> Result<Vec<RealtimeServerEvent>, ProviderError>
Converts a raw server message into zero or more standardized events. Read more
Source§async fn serialize_client_event(
&self,
event: RealtimeClientEvent,
) -> Result<JsonValue, ProviderError>
async fn serialize_client_event( &self, event: RealtimeClientEvent, ) -> Result<JsonValue, ProviderError>
Converts a standardized client event into the provider wire format.
Source§fn build_session_config(
&self,
config: &RealtimeSessionConfig,
) -> Result<JsonValue, ProviderError>
fn build_session_config( &self, config: &RealtimeSessionConfig, ) -> Result<JsonValue, ProviderError>
Converts a session configuration into the provider wire format. Read more
Auto Trait Implementations§
impl !Freeze for GoogleRealtimeModel
impl !RefUnwindSafe for GoogleRealtimeModel
impl !UnwindSafe for GoogleRealtimeModel
impl Send for GoogleRealtimeModel
impl Sync for GoogleRealtimeModel
impl Unpin for GoogleRealtimeModel
impl UnsafeUnpin for GoogleRealtimeModel
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