@@ -96,6 +96,15 @@ ProviderSettings::ProviderSettings()
96
96
googleAiApiKey.setDefaultValue (" " );
97
97
googleAiApiKey.setAutoApply (true );
98
98
99
+ // Ollama with BasicAuth Settings
100
+ ollamaBasicAuthApiKey.setSettingsKey (Constants::OLLAMA_BASIC_AUTH_API_KEY);
101
+ ollamaBasicAuthApiKey.setLabelText (Tr::tr (" Ollama BasicAuth API Key:" ));
102
+ ollamaBasicAuthApiKey.setDisplayStyle (Utils::StringAspect::LineEditDisplay);
103
+ ollamaBasicAuthApiKey.setPlaceHolderText (Tr::tr (" Enter your API key here" ));
104
+ ollamaBasicAuthApiKey.setHistoryCompleter (Constants::OLLAMA_BASIC_AUTH_API_KEY_HISTORY);
105
+ ollamaBasicAuthApiKey.setDefaultValue (" " );
106
+ ollamaBasicAuthApiKey.setAutoApply (true );
107
+
99
108
resetToDefaults.m_buttonText = Tr::tr (" Reset Page to Defaults" );
100
109
101
110
readSettings ();
@@ -119,6 +128,8 @@ ProviderSettings::ProviderSettings()
119
128
Group{title (Tr::tr (" Mistral AI Settings" )), Column{mistralAiApiKey}},
120
129
Space{8 },
121
130
Group{title (Tr::tr (" Google AI Settings" )), Column{googleAiApiKey}},
131
+ Space{8 },
132
+ Group{title (Tr::tr (" Ollama Settings" )), Column{ollamaBasicAuthApiKey}},
122
133
Stretch{1 }};
123
134
});
124
135
}
@@ -141,6 +152,9 @@ void ProviderSettings::setupConnections()
141
152
connect (&googleAiApiKey, &ButtonAspect::changed, this , [this ]() {
142
153
googleAiApiKey.writeSettings ();
143
154
});
155
+ connect (&ollamaBasicAuthApiKey, &ButtonAspect::changed, this , [this ]() {
156
+ ollamaBasicAuthApiKey.writeSettings ();
157
+ });
144
158
}
145
159
146
160
void ProviderSettings::resetSettingsToDefaults ()
@@ -159,6 +173,7 @@ void ProviderSettings::resetSettingsToDefaults()
159
173
resetAspect (openAiApiKey);
160
174
resetAspect (mistralAiApiKey);
161
175
resetAspect (googleAiApiKey);
176
+ resetAspect (ollamaBasicAuthApiKey);
162
177
}
163
178
}
164
179
0 commit comments