You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: auto-configurations/models/spring-ai-autoconfigure-model-ollama/src/main/java/org/springframework/ai/model/ollama/autoconfigure/OllamaApiAutoConfiguration.java
Copy file name to clipboardExpand all lines: auto-configurations/models/spring-ai-autoconfigure-model-ollama/src/main/java/org/springframework/ai/model/ollama/autoconfigure/OllamaConnectionDetails.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,4 +27,12 @@ public interface OllamaConnectionDetails extends ConnectionDetails {
27
27
28
28
StringgetBaseUrl();
29
29
30
+
/**
31
+
* Returns the API key for authenticating requests.
32
+
* @return the API key, or null if no authentication is required
Copy file name to clipboardExpand all lines: auto-configurations/models/spring-ai-autoconfigure-model-ollama/src/main/java/org/springframework/ai/model/ollama/autoconfigure/OllamaConnectionProperties.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,12 @@ public class OllamaConnectionProperties {
34
34
*/
35
35
privateStringbaseUrl = "http://localhost:11434";
36
36
37
+
/**
38
+
* API key for authenticating requests to Ollama API server.
39
+
* If provided, it will be sent as a Bearer token in the Authorization header.
40
+
*/
41
+
privateStringapiKey;
42
+
37
43
publicStringgetBaseUrl() {
38
44
returnthis.baseUrl;
39
45
}
@@ -42,4 +48,12 @@ public void setBaseUrl(String baseUrl) {
0 commit comments