Fixed a bug regarding hostnames of self-hosted providers (#208)

This commit is contained in:
Thorsten Sommer 2024-11-14 06:39:35 +01:00 committed by GitHub
parent d82427ba56
commit d2a2d658e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 10 deletions

View File

@ -99,7 +99,10 @@ public partial class ProviderDialog : ComponentBase
private readonly List<Model> availableModels = new();
private readonly Encryption encryption = Program.ENCRYPTION;
private Settings.Provider CreateProviderSettings() => new()
private Settings.Provider CreateProviderSettings()
{
var cleanedHostname = this.DataHostname.Trim();
return new()
{
Num = this.DataNum,
Id = this.DataId,
@ -107,9 +110,10 @@ public partial class ProviderDialog : ComponentBase
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,
Hostname = cleanedHostname.EndsWith('/') ? cleanedHostname[..^1] : cleanedHostname,
Host = this.DataHost,
};
}
#region Overrides of ComponentBase

View File

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