From d4087dbaf7208da5ae842ec5ba2e9c442bfa4f94 Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 10 Feb 2025 08:01:21 +0800 Subject: feat: supports fetching models during configuration initialization (#1161) --- src/client/macros.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/macros.rs') diff --git a/src/client/macros.rs b/src/client/macros.rs index 6a06236..6f03d59 100644 --- a/src/client/macros.rs +++ b/src/client/macros.rs @@ -87,13 +87,13 @@ macro_rules! register_client { client_types } - pub fn create_client_config(client: &str) -> anyhow::Result<(String, serde_json::Value)> { + pub async fn create_client_config(client: &str) -> anyhow::Result<(String, serde_json::Value)> { $( if client == $client::NAME && client != $crate::client::OpenAICompatibleClient::NAME { - return create_config(&$client::PROMPTS, $client::NAME) + return create_config(&$client::PROMPTS, $client::NAME).await } )+ - if let Some(ret) = create_openai_compatible_client_config(client)? { + if let Some(ret) = create_openai_compatible_client_config(client).await? { return Ok(ret); } anyhow::bail!("Unknown client '{}'", client) -- cgit v1.2.3