From a093be5581ee0e99a706285ff408dfbd441761a6 Mon Sep 17 00:00:00 2001 From: amithkoujalgi Date: Sun, 31 Aug 2025 22:02:43 +0530 Subject: [PATCH 1/2] Update OllamaAPI.java --- src/main/java/io/github/ollama4j/OllamaAPI.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/ollama4j/OllamaAPI.java b/src/main/java/io/github/ollama4j/OllamaAPI.java index 65831e1..6eedf8c 100644 --- a/src/main/java/io/github/ollama4j/OllamaAPI.java +++ b/src/main/java/io/github/ollama4j/OllamaAPI.java @@ -1643,18 +1643,18 @@ public class OllamaAPI { HttpRequest.Builder requestBuilder = HttpRequest.newBuilder(uri) .header(Constants.HttpConstants.HEADER_KEY_CONTENT_TYPE, Constants.HttpConstants.APPLICATION_JSON) .timeout(Duration.ofSeconds(requestTimeoutSeconds)); - if (isBasicAuthCredentialsSet()) { + if (isAuthSet()) { requestBuilder.header("Authorization", auth.getAuthHeaderValue()); } return requestBuilder; } /** - * Check if Basic Auth credentials set. + * Check if auth param is set. * - * @return true when Basic Auth credentials set + * @return true when auth param is set */ - private boolean isBasicAuthCredentialsSet() { + private boolean isAuthSet() { return auth != null; } From 3ddfd4fb4e7f3fcf399767ba5e6fa38d80476594 Mon Sep 17 00:00:00 2001 From: amithkoujalgi Date: Sun, 31 Aug 2025 22:23:09 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b76ee6b..edabc20 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Find more details on the [website](https://ollama4j.github.io/ollama4j/). [![Run Unit and Integration Tests](https://github.com/ollama4j/ollama4j/actions/workflows/run-tests.yml/badge.svg)](https://github.com/ollama4j/ollama4j/actions/workflows/run-tests.yml) ![Build Status](https://github.com/ollama4j/ollama4j/actions/workflows/maven-publish.yml/badge.svg) +![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/ollama4j_ollama4j?server=https%3A%2F%2Fsonarcloud.io&label=Sonar%20Quality%20Gate)