mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 01:09:40 +00:00
Allow the use of an API key for self-hosted ollama instances (#156)
This commit is contained in:
1 parent
776fa8ac58
commit
37e113af0e
12 files changed
+134
-78
No files matched your search
+5
-1
@@ -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)]
|
||||
|
||||
Reference in new issue
Block a user