diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7398aa6..f250d79 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.97.1" +channel = "1.98.0" components = ["rustfmt", "clippy"] profile = "default" diff --git a/src/controller/chat_completion/mod.rs b/src/controller/chat_completion/mod.rs index dca9d3f..26cff41 100644 --- a/src/controller/chat_completion/mod.rs +++ b/src/controller/chat_completion/mod.rs @@ -147,9 +147,7 @@ pub async fn handle( // Let's proceed below where we potentially handle text-generation. } - let text_to_speech_stage_params: Option; - - if message_context + let text_to_speech_stage_params: Option = if message_context .room_config_context() .should_auto_text_generate(original_message_is_audio) { @@ -210,7 +208,7 @@ pub async fn handle( return Ok(()); }; - text_to_speech_stage_params = match message_context + match message_context .room_config_context() .text_to_speech_bot_messages_flow_type() { @@ -243,7 +241,7 @@ pub async fn handle( text_to_speech_eligible_payload, response_type, )), - }; + } } else { tracing::debug!("Not generating text due to auto-usage configuration"); @@ -262,7 +260,7 @@ pub async fn handle( event_id: message_context.event_id().clone(), }; - text_to_speech_stage_params = match message_context + match message_context .room_config_context() .text_to_speech_user_messages_flow_type() { @@ -275,8 +273,8 @@ pub async fn handle( text_to_speech_eligible_payload, response_type, )), - }; - } + } + }; // We're potentially dealing with some text in text_to_speech_eligible_payload - either coming directly from the user or generated by an agent.