Fixed the embedding dialog to store the selected embedding model (#261)

This commit is contained in:
Thorsten Sommer 2025-01-13 20:10:58 +01:00 committed by GitHub
parent 48874d617a
commit ae72c50236
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -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,

View File

@ -2,3 +2,4 @@
- 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.
- Fixed the embedding dialog to store the selected embedding model when using LM Studio as host.