mirror of
https://github.com/sigoden/aichat
synced 2024-11-16 06:15:26 +00:00
refactor: ollam api_base configuration (#285)
This commit is contained in:
parent
1c9ca1b002
commit
0e5c8567d4
@ -41,7 +41,7 @@ clients:
|
||||
|
||||
# See https://github.com/jmorganca/ollama
|
||||
- type: ollama
|
||||
api_base: http://localhost:11434/api
|
||||
api_base: http://localhost:11434
|
||||
api_key: Basic xxx # Set authorization header
|
||||
chat_endpoint: /chat # Optional field
|
||||
models:
|
||||
|
@ -86,7 +86,7 @@ impl OllamaClient {
|
||||
|
||||
let body = build_body(data, self.model.name.clone())?;
|
||||
|
||||
let chat_endpoint = self.config.chat_endpoint.as_deref().unwrap_or("/chat");
|
||||
let chat_endpoint = self.config.chat_endpoint.as_deref().unwrap_or("/api/chat");
|
||||
|
||||
let url = format!("{}{chat_endpoint}", self.config.api_base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user