diff --git a/Cargo.lock b/Cargo.lock index ec10cac..2f6f02d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "deepwiki-rs" -version = "1.2.8" +version = "1.2.9" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index dce8255..f3a613d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deepwiki-rs" -version = "1.2.8" +version = "1.2.9" edition = "2024" description = "deepwiki-rs(also known as Litho) is a high-performance automatic generation engine for C4 architecture documentation, developed using Rust. It can intelligently analyze project structures, identify core components, parse dependency relationships, and leverage large language models (LLMs) to automatically generate professional architecture documentation." diff --git a/src/config.rs b/src/config.rs index 3b8c438..1d5853d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -642,11 +642,11 @@ impl Default for LLMConfig { provider: LLMProvider::default(), api_key: std::env::var("LITHO_LLM_API_KEY").unwrap_or_default(), api_base_url: String::from("https://api-inference.modelscope.cn/v1"), - model_efficient: String::from("ZhipuAI/GLM-4.7"), + model_efficient: String::from("ZhipuAI/GLM-5"), model_powerful: String::from("Qwen/Qwen3-Next-80B-A3B-Instruct"), max_tokens: 131072, temperature: Some(0.1), - retry_attempts: 5, + retry_attempts: 3, retry_delay_ms: 5000, timeout_seconds: 300, disable_preset_tools: false, diff --git a/src/llm/client/ollama_extractor.rs b/src/llm/client/ollama_extractor.rs index 97ac74f..6c8efa2 100644 --- a/src/llm/client/ollama_extractor.rs +++ b/src/llm/client/ollama_extractor.rs @@ -47,7 +47,7 @@ where Err(e) => { last_error = Some(format!("{:#}", e)); if attempt < self.max_retries { - tokio::time::sleep(tokio::time::Duration::from_millis(2000)).await; + tokio::time::sleep(tokio::time::Duration::from_millis(3000)).await; } } } @@ -197,4 +197,4 @@ where } Ok(()) } -} \ No newline at end of file +} diff --git a/src/llm/tools/file_explorer.rs b/src/llm/tools/file_explorer.rs index e52969a..1d36750 100644 --- a/src/llm/tools/file_explorer.rs +++ b/src/llm/tools/file_explorer.rs @@ -526,8 +526,7 @@ impl Tool for AgentToolFileExplorer { async fn call(&self, args: Self::Args) -> Result { println!(" 🔧 tool called...file_reader@{:?}", args); - #[cfg(debug_assertions)] - tokio::time::sleep(Duration::from_secs(2)).await; + tokio::time::sleep(Duration::from_secs(1)).await; match args.action.as_str() { "list_directory" => self diff --git a/src/llm/tools/file_reader.rs b/src/llm/tools/file_reader.rs index 21812f0..436bd13 100644 --- a/src/llm/tools/file_reader.rs +++ b/src/llm/tools/file_reader.rs @@ -152,8 +152,7 @@ impl Tool for AgentToolFileReader { async fn call(&self, args: Self::Args) -> Result { println!(" 🔧 tool called...file_reader@{:?}", args); - #[cfg(debug_assertions)] - tokio::time::sleep(Duration::from_secs(2)).await; + tokio::time::sleep(Duration::from_secs(1)).await; self.read_file_content(&args) .await diff --git a/src/llm/tools/time.rs b/src/llm/tools/time.rs index bd2a4dd..5e1c718 100644 --- a/src/llm/tools/time.rs +++ b/src/llm/tools/time.rs @@ -94,8 +94,7 @@ impl Tool for AgentToolTime { async fn call(&self, args: Self::Args) -> Result { println!(" 🔧 tool called...time@{:?}", args); - #[cfg(debug_assertions)] - tokio::time::sleep(Duration::from_secs(2)).await; + tokio::time::sleep(Duration::from_secs(1)).await; self.get_current_time(&args) .await