diff options
| author | sigoden <sigoden@gmail.com> | 2025-01-21 21:45:20 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-21 21:45:20 +0800 |
| commit | b666fc6bd24a039d2d23a312fa453d0fe3ed79ab (patch) | |
| tree | c19b5c07ca3fba94ed99e2f34b0e96b04d43ba6d /src/client/mod.rs | |
| parent | e522289b61bbf0d253f03433120ab3222da5e4d3 (diff) | |
| download | aichat-b666fc6bd24a039d2d23a312fa453d0fe3ed79ab.tar.gz | |
refactor: optimize configuration initialization (#1110)
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 9ccfad8..3d8d4da 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -7,7 +7,6 @@ mod model; mod stream; pub use crate::function::ToolCall; -pub use crate::utils::PromptKind; pub use common::*; pub use message::*; pub use model::*; @@ -37,7 +36,10 @@ register_client!( pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 22] = [ ("ai21", "https://api.ai21.com/studio/v1"), - ("cloudflare", ""), + ( + "cloudflare", + "https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/v1", + ), ("deepinfra", "https://api.deepinfra.com/v1/openai"), ("deepseek", "https://api.deepseek.com"), ("fireworks", "https://api.fireworks.ai/inference/v1"), @@ -49,7 +51,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 22] = [ ("mistral", "https://api.mistral.ai/v1"), ("moonshot", "https://api.moonshot.cn/v1"), ("openrouter", "https://openrouter.ai/api/v1"), - ("ollama", "http://127.0.0.1:11434/v1"), + ("ollama", "http://{OLLAMA_HOST}:11434/v1"), ("perplexity", "https://api.perplexity.ai"), ( "qianwen", |
