From ae72c50236f72e2a6d50096cbc6a8017aabc4b10 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 13 Jan 2025 20:10:58 +0100 Subject: [PATCH] Fixed the embedding dialog to store the selected embedding model (#261) --- .../Dialogs/EmbeddingProviderDialog.razor.cs | 13 ++++++++++++- app/MindWork AI Studio/wwwroot/changelog/v0.9.26.md | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/EmbeddingProviderDialog.razor.cs b/app/MindWork AI Studio/Dialogs/EmbeddingProviderDialog.razor.cs index 14e8cc2..399c9b8 100644 --- a/app/MindWork AI Studio/Dialogs/EmbeddingProviderDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/EmbeddingProviderDialog.razor.cs @@ -112,13 +112,24 @@ public partial class EmbeddingProviderDialog : ComponentBase, ISecretId private EmbeddingProvider CreateEmbeddingProviderSettings() { var cleanedHostname = this.DataHostname.Trim(); + Model model = default; + if(this.DataLLMProvider is LLMProviders.SELF_HOSTED) + { + if (this.DataHost is Host.OLLAMA) + model = new Model(this.dataManuallyModel, null); + else if (this.DataHost is Host.LM_STUDIO) + model = this.DataModel; + } + else + model = this.DataModel; + return new() { Num = this.DataNum, Id = this.DataId, Name = this.DataName, UsedLLMProvider = this.DataLLMProvider, - Model = this.DataLLMProvider is LLMProviders.SELF_HOSTED ? new Model(this.dataManuallyModel, null) : this.DataModel, + Model = model, IsSelfHosted = this.DataLLMProvider is LLMProviders.SELF_HOSTED, Hostname = cleanedHostname.EndsWith('/') ? cleanedHostname[..^1] : cleanedHostname, Host = this.DataHost, diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.26.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.26.md index fbf3ff7..c23e840 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.26.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.26.md @@ -1,4 +1,5 @@ # v0.9.26, build 201 (2025-01-xx xx:xx UTC) - Added the ability to configure local and remote (ERI) data sources in the settings as a preview feature behind the RAG feature flag. - Fixed the ERI server assistant to ask for confirmation before deleting a ERI server preset. -- Fixed a bug in the ERI server assistant that allowed an empty directory as a base directory for the code generation. \ No newline at end of file +- Fixed a bug in the ERI server assistant that allowed an empty directory as a base directory for the code generation. +- Fixed the embedding dialog to store the selected embedding model when using LM Studio as host. \ No newline at end of file