refactor: ollam api_base configuration (#285)

This commit is contained in:
sigoden 2023-12-25 08:05:06 +08:00 committed by GitHub
parent 1c9ca1b002
commit 0e5c8567d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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);