pub struct RealtimeConnectOptions {
pub api_key: String,
pub base_url: String,
pub model: String,
pub organization: Option<String>,
pub project: Option<String>,
pub extra_headers: Vec<(String, String)>,
}Expand description
Options controlling how a realtime connection is opened.
connect takes base_url + api_key directly (rather than a Client)
so the realtime module has no dependency on client configuration; an
accessor on the client can populate these fields.
Fields§
§api_key: StringAPI key sent as Authorization: Bearer <api_key>.
base_url: StringHTTP(S) base URL, e.g. https://api.openai.com/v1. The scheme is
converted to ws/wss and /realtime is appended.
model: StringRealtime model, sent as the model query parameter.
organization: Option<String>Optional OpenAI-Organization header.
project: Option<String>Optional OpenAI-Project header.
extra_headers: Vec<(String, String)>Additional headers to attach to the upgrade request.
Trait Implementations§
Source§impl Clone for RealtimeConnectOptions
impl Clone for RealtimeConnectOptions
Source§fn clone(&self) -> RealtimeConnectOptions
fn clone(&self) -> RealtimeConnectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RealtimeConnectOptions
impl RefUnwindSafe for RealtimeConnectOptions
impl Send for RealtimeConnectOptions
impl Sync for RealtimeConnectOptions
impl Unpin for RealtimeConnectOptions
impl UnsafeUnpin for RealtimeConnectOptions
impl UnwindSafe for RealtimeConnectOptions
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