From be4bacf362a311f9cd2f1fb1ba4ae03e9179f00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cipriani=20Bandarra?= Date: Fri, 30 Jan 2026 19:40:26 +0000 Subject: [PATCH] Add Default impl for OllamaClient Connects to http://localhost:11434, the standard local Ollama address. Users can now use OllamaClient::default() for the common case instead of always providing the server address explicitly. --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8eb7b82..391cce0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,6 +28,12 @@ pub struct OllamaClient { client: reqwest::Client, } +impl Default for OllamaClient { + fn default() -> Self { + Self::new("http://localhost:11434") + } +} + impl OllamaClient { pub fn new>(server_address: S) -> Self { Self {