mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-09-16 03:39:05 +02:00
Merge pull request #151 from ollama4j/docs-updates
All checks were successful
Mark stale issues / stale (push) Successful in 32s
All checks were successful
Mark stale issues / stale (push) Successful in 32s
This commit is contained in:
commit
0e0c83a065
@ -34,6 +34,7 @@ Find more details on the [website](https://ollama4j.github.io/ollama4j/).
|
||||
|
||||
[](https://github.com/ollama4j/ollama4j/actions/workflows/run-tests.yml)
|
||||

|
||||

|
||||
|
||||
|
||||
</div>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user