diff --git a/app/MindWork AI Studio/Dialogs/ProviderDialog.razor.cs b/app/MindWork AI Studio/Dialogs/ProviderDialog.razor.cs index c791606..b3458cb 100644 --- a/app/MindWork AI Studio/Dialogs/ProviderDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/ProviderDialog.razor.cs @@ -99,17 +99,21 @@ public partial class ProviderDialog : ComponentBase private readonly List availableModels = new(); private readonly Encryption encryption = Program.ENCRYPTION; - private Settings.Provider CreateProviderSettings() => new() + private Settings.Provider CreateProviderSettings() { - Num = this.DataNum, - Id = this.DataId, - InstanceName = this.DataInstanceName, - UsedLLMProvider = this.DataLLMProvider, - Model = this.DataLLMProvider is LLMProviders.FIREWORKS ? new Model(this.dataManuallyModel, null) : this.DataModel, - IsSelfHosted = this.DataLLMProvider is LLMProviders.SELF_HOSTED, - Hostname = this.DataHostname.EndsWith('/') ? this.DataHostname[..^1] : this.DataHostname, - Host = this.DataHost, - }; + var cleanedHostname = this.DataHostname.Trim(); + return new() + { + Num = this.DataNum, + Id = this.DataId, + InstanceName = this.DataInstanceName, + UsedLLMProvider = this.DataLLMProvider, + Model = this.DataLLMProvider is LLMProviders.FIREWORKS ? new Model(this.dataManuallyModel, null) : this.DataModel, + IsSelfHosted = this.DataLLMProvider is LLMProviders.SELF_HOSTED, + Hostname = cleanedHostname.EndsWith('/') ? cleanedHostname[..^1] : cleanedHostname, + Host = this.DataHost, + }; + } #region Overrides of ComponentBase diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md index ecab422..109e602 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md @@ -1,5 +1,6 @@ # 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. +- Fixed a bug regarding hostnames of self-hosted providers, where it was possible to enter spaces at the end. - Upgraded .NET to v8.0.11. - Upgraded HtmlAgilityPack to v1.11.71. - Upgraded MudBlazor to v7.15.0. \ No newline at end of file