From d7f918c3d137fe72c58623d9fdc7eaceff7b9013 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 10 Nov 2024 21:33:54 +0100 Subject: [PATCH 1/2] Spelling --- app/MindWork AI Studio/Chat/ContentText.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Chat/ContentText.cs b/app/MindWork AI Studio/Chat/ContentText.cs index bbf65065..8cb5fe2a 100644 --- a/app/MindWork AI Studio/Chat/ContentText.cs +++ b/app/MindWork AI Studio/Chat/ContentText.cs @@ -40,7 +40,7 @@ public async Task CreateFromProviderAsync(IProvider provider, SettingsManager se if(chatThread is null) return; - // Store the last time we got a response. We use this ater + // Store the last time we got a response. We use this later // to determine whether we should notify the UI about the // new content or not. Depends on the energy saving mode // the user chose. From 24eaa835af47c58c1a04f9a556a0062b9f23a7cc Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 13 Nov 2024 20:32:07 +0100 Subject: [PATCH 2/2] Added provider metadata regarding embeddings --- .../Provider/LLMProvidersExtensions.cs | 29 +++++++++++++++++++ .../wwwroot/changelog/v0.9.19.md | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md diff --git a/app/MindWork AI Studio/Provider/LLMProvidersExtensions.cs b/app/MindWork AI Studio/Provider/LLMProvidersExtensions.cs index 2dc84b58..c2420cc3 100644 --- a/app/MindWork AI Studio/Provider/LLMProvidersExtensions.cs +++ b/app/MindWork AI Studio/Provider/LLMProvidersExtensions.cs @@ -65,6 +65,35 @@ public static class LLMProvidersExtensions _ => Confidence.UNKNOWN.WithLevel(settingsManager.GetConfiguredConfidenceLevel(llmProvider)), }; + /// + /// Determines if the specified provider supports embeddings. + /// + /// The provider to check. + /// True if the provider supports embeddings; otherwise, false. + public static bool ProvideEmbeddings(this LLMProviders llmProvider) => llmProvider switch + { + // + // Providers that support embeddings: + // + LLMProviders.OPEN_AI => true, + LLMProviders.MISTRAL => true, + LLMProviders.GOOGLE => true, + + // + // Providers that do not support embeddings: + // + LLMProviders.GROQ => false, + LLMProviders.ANTHROPIC => false, + LLMProviders.FIREWORKS => false, + + // + // Self-hosted providers are treated as a special case anyway. + // + LLMProviders.SELF_HOSTED => false, + + _ => false, + }; + /// /// Creates a new provider instance based on the provider value. /// diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md new file mode 100644 index 00000000..8eec006e --- /dev/null +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md @@ -0,0 +1,2 @@ +# v0.9.19, build 194 (2024-11-xx xx:xx UTC) +- Added provider's metadata: which providers offer embeddings for RAG? This is in preparation for integrating your data and files. \ No newline at end of file