pub struct OpenAiRealtime { /* private fields */ }
Expand description
Experimental real‑time OpenAI model (e.g., audio transcription).
Implementations§
Trait Implementations§
Source§impl Model for OpenAiRealtime
impl Model for OpenAiRealtime
Source§fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Perform a generation request and return the raw response as a string.
Source§fn get_response<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
system_instructions: Option<&'life1 str>,
input: &'life2 str,
_model_settings: Option<HashMap<String, String>>,
_messages: Option<&'life3 [Value]>,
_tools: Option<&'life4 [Value]>,
_tool_choice: Option<Value>,
_output_schema: Option<&'life5 str>,
_handoffs: Option<&'life6 [String]>,
_tracing_enabled: bool,
_previous_response_id: Option<&'life7 str>,
_prompt_config: Option<&'life8 str>,
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
fn get_response<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
system_instructions: Option<&'life1 str>,
input: &'life2 str,
_model_settings: Option<HashMap<String, String>>,
_messages: Option<&'life3 [Value]>,
_tools: Option<&'life4 [Value]>,
_tool_choice: Option<Value>,
_output_schema: Option<&'life5 str>,
_handoffs: Option<&'life6 [String]>,
_tracing_enabled: bool,
_previous_response_id: Option<&'life7 str>,
_prompt_config: Option<&'life8 str>,
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
Rich response method (scaffold) to align with Python’s get_response signature.
Default implementation wraps
generate
with a simple string prompt.Auto Trait Implementations§
impl Freeze for OpenAiRealtime
impl !RefUnwindSafe for OpenAiRealtime
impl Send for OpenAiRealtime
impl Sync for OpenAiRealtime
impl Unpin for OpenAiRealtime
impl !UnwindSafe for OpenAiRealtime
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