mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-11 21:31:04 +00:00
chore(deps): Update and centralize dependencies (#436)
* chore(deps): Update and centralize dependencies * Update treesitter to 0.22.2 * Update kotlin to 1.9.23 * Update jackson to 2.17.0 * Update gradle-intellij-plugin to 1.17.3 * Update gradle to 8.7 * Use BOMs where possible * Centralize dependencies in version catalog * Allow Dependabot to update other modules (add treesitter and buildSrc/src/main/kotlin, remove core) * fix: preload credentials only once for all headers
This commit is contained in:
parent
52ceaa6a26
commit
7f505e2c30
13 changed files with 71 additions and 32 deletions
|
|
@ -216,10 +216,10 @@ public class CompletionRequestProvider {
|
|||
List<OpenAIChatCompletionMessage> messages,
|
||||
boolean streamRequest) {
|
||||
var requestBuilder = new Request.Builder().url(customConfiguration.getUrl().trim());
|
||||
var credential = CredentialsStore.INSTANCE.getCredential(CUSTOM_SERVICE_API_KEY);
|
||||
for (var entry : customConfiguration.getHeaders().entrySet()) {
|
||||
String value = entry.getValue();
|
||||
var credential = CredentialsStore.INSTANCE.getCredential(CUSTOM_SERVICE_API_KEY);
|
||||
if (value.contains("$CUSTOM_SERVICE_API_KEY") && credential != null) {
|
||||
if (credential != null && value.contains("$CUSTOM_SERVICE_API_KEY")) {
|
||||
value = value.replace("$CUSTOM_SERVICE_API_KEY", credential);
|
||||
}
|
||||
requestBuilder.addHeader(entry.getKey(), value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue