main
maye 2025-08-20 23:16:22 +08:00
parent 1bc2990aa6
commit ff7e137b02
3 changed files with 10 additions and 11 deletions

12
Cargo.lock generated
View File

@ -1466,9 +1466,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.46.1"
version = "1.47.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038"
dependencies = [
"backtrace",
"bytes",
@ -1477,9 +1477,9 @@ dependencies = [
"mio",
"pin-project-lite",
"slab",
"socket2 0.5.10",
"socket2 0.6.0",
"tokio-macros",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@ -1675,9 +1675,9 @@ dependencies = [
[[package]]
name = "tracing-indicatif"
version = "0.3.11"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c714cc8fc46db04fcfddbd274c6ef59bebb1b435155984e7c6e89c3ce66f200"
checksum = "04d4e11e0e27acef25a47f27e9435355fecdc488867fa2bc90e75b0700d2823d"
dependencies = [
"indicatif",
"tracing",

View File

@ -11,7 +11,7 @@ futures = "0.3"
regex = "1.11"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls","http2"] }
serde_json = "1.0"
tokio = { version = "1.46.1", features = [
tokio = { version = "1.47", features = [
"macros",
"rt-multi-thread",
"time",
@ -25,5 +25,5 @@ toml = "0.9"
thiserror = "2.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
tracing-indicatif = "0.3"
tracing-indicatif = "0.3.12"
indicatif = "0.18"

View File

@ -114,10 +114,9 @@ impl KeyCheckerConfig {
/// Returns the complete Gemini API URL for generateContent endpoint
pub fn gemini_api_url(&self) -> Url {
let uri = format!("{}{}{}", "/v1beta/models/", self.model, ":generateContent");
self.api_host
.join("v1beta/models/")
.join(self.model)
.join(":generateContent")
.join(uri.as_str())
.expect("Failed to join API URL")
}