Allow the use of an API key for self-hosted ollama instances (#156)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-10-07 13:26:25 +02:00
1 parent 776fa8ac58
commit 37e113af0e
12 files changed
+134 -78

No files matched your search

+5 -1
View File
@@ -966,7 +966,10 @@ fn get_secret(_token: APIToken, request: Json<RequestSecret>) -> Json<RequestedS
},
Err(e) => {
error!(Source = "Secret Store"; "Failed to retrieve secret for '{service}' and user '{user_name}': {e}.");
if !request.is_trying {
error!(Source = "Secret Store"; "Failed to retrieve secret for '{service}' and user '{user_name}': {e}.");
}
Json(RequestedSecret {
success: false,
secret: EncryptedText::new(String::from("")),
@@ -980,6 +983,7 @@ fn get_secret(_token: APIToken, request: Json<RequestSecret>) -> Json<RequestedS
struct RequestSecret {
destination: String,
user_name: String,
is_trying: bool,
}
#[derive(Serialize)]