refactor: ollam api_base configuration (#285)

pull/288/head
sigoden 6 months ago committed by GitHub
parent 1c9ca1b002
commit 0e5c8567d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save