From 2cba09c064b366ad91c7eda3acbc2030215a1842 Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 2 Sep 2024 08:23:21 +0800 Subject: feat: migrate `cloudflare` client to `openai-compatible` (#821) --- src/client/common.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/client/common.rs') diff --git a/src/client/common.rs b/src/client/common.rs index 684d10e..9d6480a 100644 --- a/src/client/common.rs +++ b/src/client/common.rs @@ -364,7 +364,7 @@ pub fn create_config(prompts: &[PromptAction], client: &str) -> Result<(String, pub fn create_openai_compatible_client_config(client: &str) -> Result> { match super::OPENAI_COMPATIBLE_PLATFORMS - .iter() + .into_iter() .find(|(name, _)| client == *name) { None => Ok(None), @@ -372,13 +372,16 @@ pub fn create_openai_compatible_client_config(client: &str) -> Result Result