pub struct LiveSessionBuilder { /* private fields */ }Implementations§
Source§impl LiveSessionBuilder
impl LiveSessionBuilder
Sourcepub fn with_config(self, config: LiveConnectConfig) -> Self
pub fn with_config(self, config: LiveConnectConfig) -> Self
设置连接配置。
Sourcepub fn with_system_instruction(self, instruction: impl Into<String>) -> Self
pub fn with_system_instruction(self, instruction: impl Into<String>) -> Self
设置系统指令。
Sourcepub fn with_tools(self, tools: Vec<Tool>) -> Self
pub fn with_tools(self, tools: Vec<Tool>) -> Self
设置工具列表。
Sourcepub fn with_generation_config(self, config: GenerationConfig) -> Self
pub fn with_generation_config(self, config: GenerationConfig) -> Self
设置生成配置。
Sourcepub fn with_session_resumption(self) -> Self
pub fn with_session_resumption(self) -> Self
启用会话恢复(自动获取 resumption handle)。
Sourcepub fn with_session_resumption_handle(self, handle: impl Into<String>) -> Self
pub fn with_session_resumption_handle(self, handle: impl Into<String>) -> Self
使用指定的 resumption handle 恢复会话。
Sourcepub fn with_context_window_compression(
self,
config: ContextWindowCompressionConfig,
) -> Self
pub fn with_context_window_compression( self, config: ContextWindowCompressionConfig, ) -> Self
配置上下文窗口压缩。
Sourcepub const fn with_input_audio_transcription(
self,
config: AudioTranscriptionConfig,
) -> Self
pub const fn with_input_audio_transcription( self, config: AudioTranscriptionConfig, ) -> Self
配置输入音频转录。
Sourcepub const fn with_output_audio_transcription(
self,
config: AudioTranscriptionConfig,
) -> Self
pub const fn with_output_audio_transcription( self, config: AudioTranscriptionConfig, ) -> Self
配置输出音频转录。
Sourcepub async fn connect(self) -> Result<LiveSession>
pub async fn connect(self) -> Result<LiveSession>
Auto Trait Implementations§
impl Freeze for LiveSessionBuilder
impl !RefUnwindSafe for LiveSessionBuilder
impl Send for LiveSessionBuilder
impl Sync for LiveSessionBuilder
impl Unpin for LiveSessionBuilder
impl UnsafeUnpin for LiveSessionBuilder
impl !UnwindSafe for LiveSessionBuilder
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