mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-11 17:13:48 +00:00
Fixed the embedding dialog to store the selected embedding model (#261)
This commit is contained in:
1 parent
48874d617a
commit
ae72c50236
2 files changed
+14
-2
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user