pub struct OpenAIRealtimeClient { /* private fields */ }Implementations§
Source§impl OpenAIRealtimeClient
impl OpenAIRealtimeClient
pub fn new(address: String) -> Self
pub fn set_key(&mut self, api_key: &str) -> Result<(), String>
pub fn set_system_prompt(&mut self, prompt: &str) -> Result<(), String>
pub fn set_tools_enabled(&mut self, enabled: bool)
pub fn create_realtime_session( &self, bot_id: &BotId, tools: &[Tool], ) -> BoxPlatformSendFuture<'static, ClientResult<RealtimeChannel>>
Trait Implementations§
Source§impl BotClient for OpenAIRealtimeClient
impl BotClient for OpenAIRealtimeClient
Source§fn send(
&mut self,
bot_id: &BotId,
_messages: &[Message],
tools: &[Tool],
) -> BoxPlatformSendStream<'static, ClientResult<MessageContent>>
fn send( &mut self, bot_id: &BotId, _messages: &[Message], tools: &[Tool], ) -> BoxPlatformSendStream<'static, ClientResult<MessageContent>>
Send a message to a bot with support for streamed response. Read more
Source§fn bots(&self) -> BoxPlatformSendFuture<'static, ClientResult<Vec<Bot>>>
fn bots(&self) -> BoxPlatformSendFuture<'static, ClientResult<Vec<Bot>>>
Interrupt the bot’s current operation.
Bots available under this client.
Source§fn clone_box(&self) -> Box<dyn BotClient>
fn clone_box(&self) -> Box<dyn BotClient>
Make a boxed dynamic clone of this client to pass around.
Source§fn content_widget(
&mut self,
_cx: &mut Cx,
_previous_widget: WidgetRef,
_templates: &HashMap<LiveId, LivePtr>,
_content: &MessageContent,
) -> Option<WidgetRef>
fn content_widget( &mut self, _cx: &mut Cx, _previous_widget: WidgetRef, _templates: &HashMap<LiveId, LivePtr>, _content: &MessageContent, ) -> Option<WidgetRef>
Optionally override how the content of a message is rendered by Makepad. Read more
Source§impl Clone for OpenAIRealtimeClient
impl Clone for OpenAIRealtimeClient
Source§fn clone(&self) -> OpenAIRealtimeClient
fn clone(&self) -> OpenAIRealtimeClient
Returns a duplicate of the value. Read more
1.0.0 · 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 OpenAIRealtimeClient
impl RefUnwindSafe for OpenAIRealtimeClient
impl Send for OpenAIRealtimeClient
impl Sync for OpenAIRealtimeClient
impl Unpin for OpenAIRealtimeClient
impl UnwindSafe for OpenAIRealtimeClient
Blanket Implementations§
§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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