mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 22:32:56 +00:00
Rename NO_CHATTEMPLATE to NO_CHAT_TEMPLATE.
This commit is contained in:
parent
e64d8163eb
commit
8ac19d6dda
@ -89,7 +89,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
||||
protected MudForm? form;
|
||||
protected bool inputIsValid;
|
||||
protected Profile currentProfile = Profile.NO_PROFILE;
|
||||
protected ChatTemplate currentChatTemplate = ChatTemplate.NO_CHATTEMPLATE;
|
||||
protected ChatTemplate currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
protected ChatThread? chatThread;
|
||||
protected IContent? lastUserPrompt;
|
||||
protected CancellationTokenSource? cancellationTokenSource;
|
||||
|
@ -104,7 +104,7 @@ public sealed record ChatThread
|
||||
systemPromptTextWithChatTemplate = chatThread.SystemPrompt;
|
||||
else
|
||||
{
|
||||
if(chatThread.SelectedChatTemplate == ChatTemplate.NO_CHATTEMPLATE.Id || chatTeamplateId == Guid.Empty)
|
||||
if(chatThread.SelectedChatTemplate == ChatTemplate.NO_CHAT_TEMPLATE.Id || chatTeamplateId == Guid.Empty)
|
||||
systemPromptTextWithChatTemplate = chatThread.SystemPrompt;
|
||||
else
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
private DataSourceSelection? dataSourceSelectionComponent;
|
||||
private DataSourceOptions earlyDataSourceOptions = new();
|
||||
private Profile currentProfile = Profile.NO_PROFILE;
|
||||
private ChatTemplate currentChatTemplate = ChatTemplate.NO_CHATTEMPLATE;
|
||||
private ChatTemplate currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
private bool hasUnsavedChanges;
|
||||
private bool mustScrollToBottomAfterRender;
|
||||
private InnerScrolling scrollingArea = null!;
|
||||
@ -804,7 +804,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
{
|
||||
this.currentChatTemplate = this.SettingsManager.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id == chatChatTemplate);
|
||||
if(this.currentChatTemplate == default)
|
||||
this.currentChatTemplate = ChatTemplate.NO_CHATTEMPLATE;
|
||||
this.currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace AIStudio.Components;
|
||||
public partial class ChatTemplateSelection : MSGComponentBase
|
||||
{
|
||||
[Parameter]
|
||||
public ChatTemplate CurrentChatTemplate { get; set; } = ChatTemplate.NO_CHATTEMPLATE;
|
||||
public ChatTemplate CurrentChatTemplate { get; set; } = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<ChatTemplate> CurrentChatTemplateChanged { get; set; }
|
||||
|
@ -7,7 +7,7 @@ public readonly record struct ChatTemplate(uint Num, string Id, string Name, str
|
||||
{
|
||||
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(ChatTemplate).Namespace, nameof(ChatTemplate));
|
||||
|
||||
public static readonly ChatTemplate NO_CHATTEMPLATE = new()
|
||||
public static readonly ChatTemplate NO_CHAT_TEMPLATE = new()
|
||||
{
|
||||
Name = TB("Use no chat template"),
|
||||
SystemPrompt = string.Empty,
|
||||
@ -34,5 +34,4 @@ public readonly record struct ChatTemplate(uint Num, string Id, string Name, str
|
||||
|
||||
return this.SystemPrompt;
|
||||
}
|
||||
|
||||
}
|
@ -273,7 +273,7 @@ public sealed class SettingsManager
|
||||
return preselection;
|
||||
|
||||
preselection = this.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id == this.ConfigurationData.App.PreselectedChatTemplate);
|
||||
return preselection != default ? preselection : ChatTemplate.NO_CHATTEMPLATE;
|
||||
return preselection != default ? preselection : ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
}
|
||||
|
||||
public ConfidenceLevel GetConfiguredConfidenceLevel(LLMProviders llmProvider)
|
||||
|
@ -6,7 +6,7 @@ public static class ChatTemplateExtensions
|
||||
{
|
||||
public static IEnumerable<ChatTemplate> GetAllChatTemplates(this IEnumerable<ChatTemplate> chatTemplates)
|
||||
{
|
||||
yield return ChatTemplate.NO_CHATTEMPLATE;
|
||||
yield return ChatTemplate.NO_CHAT_TEMPLATE;
|
||||
foreach (var chatTemplate in chatTemplates)
|
||||
yield return chatTemplate;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user