mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 09:37:59 +00:00
Added local RAG (#756)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
d043fbc8f0
commit
c7b42bee96
179 files changed
+276977
-1421
No files matched your search
@@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using AIStudio.Dialogs;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
@@ -84,6 +85,7 @@ public partial class SettingsPanelProviders : SettingsPanelProviderBase
|
||||
{ x => x.DataHost, provider.Host },
|
||||
{ x => x.HFInferenceProviderId, provider.HFInferenceProvider },
|
||||
{ x => x.AdditionalJsonApiParameters, provider.AdditionalJsonApiParameters },
|
||||
{ x => x.DataTokenizerPath, provider.TokenizerPath },
|
||||
{ x => x.DataCapabilityOverrides, provider.CapabilityOverrides },
|
||||
{ x => x.IsEnterpriseConfiguration, provider.IsEnterpriseConfiguration },
|
||||
};
|
||||
@@ -131,6 +133,13 @@ public partial class SettingsPanelProviders : SettingsPanelProviderBase
|
||||
return;
|
||||
|
||||
var deleteSecretResponse = await this.RustService.DeleteAPIKey(provider, SecretStoreType.LLM_PROVIDER);
|
||||
|
||||
//
|
||||
// Removing the tokenizer is best effort: it leaves an unused file behind when it fails,
|
||||
// which is not worth bothering the user about while they are deleting the provider. The
|
||||
// API key is different, though, because a leftover secret is a secret we promised to remove.
|
||||
//
|
||||
_ = await this.RustService.DeleteTokenizer(TokenizerModelId.ForProvider(provider));
|
||||
if(deleteSecretResponse.Success)
|
||||
{
|
||||
this.SettingsManager.ConfigurationData.Providers.Remove(provider);
|
||||
|
||||
Reference in new issue
Block a user