mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 03:52:57 +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 MudForm? form;
|
||||||
protected bool inputIsValid;
|
protected bool inputIsValid;
|
||||||
protected Profile currentProfile = Profile.NO_PROFILE;
|
protected Profile currentProfile = Profile.NO_PROFILE;
|
||||||
protected ChatTemplate currentChatTemplate = ChatTemplate.NO_CHATTEMPLATE;
|
protected ChatTemplate currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||||
protected ChatThread? chatThread;
|
protected ChatThread? chatThread;
|
||||||
protected IContent? lastUserPrompt;
|
protected IContent? lastUserPrompt;
|
||||||
protected CancellationTokenSource? cancellationTokenSource;
|
protected CancellationTokenSource? cancellationTokenSource;
|
||||||
|
@ -104,7 +104,7 @@ public sealed record ChatThread
|
|||||||
systemPromptTextWithChatTemplate = chatThread.SystemPrompt;
|
systemPromptTextWithChatTemplate = chatThread.SystemPrompt;
|
||||||
else
|
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;
|
systemPromptTextWithChatTemplate = chatThread.SystemPrompt;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
private DataSourceSelection? dataSourceSelectionComponent;
|
private DataSourceSelection? dataSourceSelectionComponent;
|
||||||
private DataSourceOptions earlyDataSourceOptions = new();
|
private DataSourceOptions earlyDataSourceOptions = new();
|
||||||
private Profile currentProfile = Profile.NO_PROFILE;
|
private Profile currentProfile = Profile.NO_PROFILE;
|
||||||
private ChatTemplate currentChatTemplate = ChatTemplate.NO_CHATTEMPLATE;
|
private ChatTemplate currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||||
private bool hasUnsavedChanges;
|
private bool hasUnsavedChanges;
|
||||||
private bool mustScrollToBottomAfterRender;
|
private bool mustScrollToBottomAfterRender;
|
||||||
private InnerScrolling scrollingArea = null!;
|
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);
|
this.currentChatTemplate = this.SettingsManager.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id == chatChatTemplate);
|
||||||
if(this.currentChatTemplate == default)
|
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
|
public partial class ChatTemplateSelection : MSGComponentBase
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public ChatTemplate CurrentChatTemplate { get; set; } = ChatTemplate.NO_CHATTEMPLATE;
|
public ChatTemplate CurrentChatTemplate { get; set; } = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<ChatTemplate> CurrentChatTemplateChanged { get; set; }
|
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));
|
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"),
|
Name = TB("Use no chat template"),
|
||||||
SystemPrompt = string.Empty,
|
SystemPrompt = string.Empty,
|
||||||
@ -34,5 +34,4 @@ public readonly record struct ChatTemplate(uint Num, string Id, string Name, str
|
|||||||
|
|
||||||
return this.SystemPrompt;
|
return this.SystemPrompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -273,7 +273,7 @@ public sealed class SettingsManager
|
|||||||
return preselection;
|
return preselection;
|
||||||
|
|
||||||
preselection = this.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id == this.ConfigurationData.App.PreselectedChatTemplate);
|
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)
|
public ConfidenceLevel GetConfiguredConfidenceLevel(LLMProviders llmProvider)
|
||||||
|
@ -6,7 +6,7 @@ public static class ChatTemplateExtensions
|
|||||||
{
|
{
|
||||||
public static IEnumerable<ChatTemplate> GetAllChatTemplates(this IEnumerable<ChatTemplate> chatTemplates)
|
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)
|
foreach (var chatTemplate in chatTemplates)
|
||||||
yield return chatTemplate;
|
yield return chatTemplate;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user