mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 04:27:21 +00:00
Added a home page prompt for missing API keys of enterprise providers (#1056)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
1f8d72aa45
commit
7d35536c87
29 files changed
+920
-31
No files matched your search
@@ -76,19 +76,20 @@ public static class ConfigurationSnippetImport
|
||||
return true;
|
||||
|
||||
//
|
||||
// A user-provided API key is what an organization grants for a provider it manages. A
|
||||
// provider of the user's own has nothing else, so the flag carries no meaning here:
|
||||
// A user-provided API key, and asking the user for it, is what an organization grants for a
|
||||
// provider it manages. A provider of the user's own has nothing else, so neither option carries
|
||||
// any meaning here:
|
||||
//
|
||||
case Settings.Provider provider:
|
||||
result = new(MakeLocal(provider) with { TokenizerPath = KeepLocalTokenizer(provider.TokenizerPath, hints), AllowUserProvidedAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
result = new(MakeLocal(provider) with { TokenizerPath = KeepLocalTokenizer(provider.TokenizerPath, hints), AllowUserProvidedAPIKey = false, PromptForUserAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
return true;
|
||||
|
||||
case EmbeddingProvider provider:
|
||||
result = new(MakeLocal(provider) with { TokenizerPath = KeepLocalTokenizer(provider.TokenizerPath, hints), AllowUserProvidedAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
result = new(MakeLocal(provider) with { TokenizerPath = KeepLocalTokenizer(provider.TokenizerPath, hints), AllowUserProvidedAPIKey = false, PromptForUserAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
return true;
|
||||
|
||||
case TranscriptionProvider provider:
|
||||
result = new(MakeLocal(provider) with { AllowUserProvidedAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
result = new(MakeLocal(provider) with { AllowUserProvidedAPIKey = false, PromptForUserAPIKey = false }, ReadAPIKey(table, hints), hints, []);
|
||||
return true;
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user