@using AIStudio.Chat @using AIStudio.Settings @using AIStudio.Settings.DataModel @inherits MSGComponentBase @* A drop anywhere in this dialog belongs to the dialog, not to the page behind it: *@ @* The name for the drop state is given although nobody uses it: the messages of this dialog are listed in a table, whose rows would otherwise ask for the same name. *@ @T("Create your custom chat template to tailor the LLM's behavior for specific tasks or domains. Define a custom system prompt and provide an example conversation to design an AI experience perfectly suited to your requirements.") @T("The name of the chat template is mandatory. Each chat template must have a unique name.") @* ReSharper disable once CSharpWarnings::CS8974 *@ @T("System Prompt") @T("Are you unsure which system prompt to use? You might start with the default system prompt that AI Studio uses for all chats.") @T("Use the default system prompt") @T("Predefined User Input") @T("You might want to predefine a first message that will be copied into the user prompt, when you use this chat template. This message could for example be a blueprint for a structured message that this chat template is defined to work with.") @T("File Attachments") @T("You can attach files that will be automatically included when using this chat template. These files will be added to the first message sent in any chat using this template.") @if (!this.IsEditing && !this.IsReadOnly) { @if (this.HasUnresolvedAttachments) { @T("Some attachments of this chat template are not on this computer. Please relink or remove them before you add the template.") } @if (!string.IsNullOrWhiteSpace(this.relinkIssue)) { @this.relinkIssue } @for (var index = 0; index < this.attachmentsToRelink.Count; index++) { var currentIndex = index; var attachment = this.attachmentsToRelink[index]; } } @T("Profile Usage") @T("Using some chat templates in tandem with profiles might cause issues. Therefore, you might prohibit the usage of profiles here.") @if (this.AllowProfileUsage) { @T("A chat template may also decide which profile a chat starts with, including starting without one. Without such a decision, those chats start with the profile they would start with anyway. The profile stays changeable in the chat.") @if (this.preselectProfile) { @T("Use no profile") @foreach (var profile in this.SettingsManager.ConfigurationData.Profiles) { @profile.GetSafeName() } @if (this.IsPreselectedProfileMissing) { @T("The profile this chat template preselects does not exist on this computer. Chats started with it keep their usual profile.") } } } @T("Provider") @T("A chat template may decide which provider, and with it which model, a chat starts with. Without such a decision, those chats start with the provider they would start with anyway. The provider stays changeable in the chat, and it must meet the confidence level required for chats.") @if (this.preselectProvider) { @foreach (var provider in this.SettingsManager.GetConfidentProviders(Components.CHAT)) { } @if (this.IsPreselectedProviderUnusable) { @T("The provider this chat template preselects does not exist on this computer or does not meet the confidence level required for chats. Chats started with it keep their usual provider.") } } @T("Workspace") @T("A chat template may keep its chats in a workspace of its own, which is created when it does not exist yet. This applies whenever a chat would otherwise be a disappearing chat, for example, when you start a new chat outside the workspaces or pick this template in a new chat. A chat you start in a workspace on purpose, for example, from the workspace list, stays in that workspace.") @* While workspaces are off, nothing goes into a workspace, so choosing one here would promise what no chat does: *@ @if (this.AreWorkspacesDisabled) { @T("Workspaces are switched off in your workspace settings. While they are off, chats with this template belong to no workspace, and they do not move into a workspace when you switch workspaces on again. You can change this choice once workspaces are on.") } @if (this.preselectWorkspace) { } @T("Tools") @T("A chat template may decide which tools a chat starts with. Without such a decision, those chats start with the tools you chose as your default in the chat options. Deciding and then picking nothing is a different statement: such chats start with no tool at all, no matter what your default says.") @if (this.preselectTools) { } @if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager)) { @T("Data Sources") @T("The same goes for your data. A chat template may bring its own data source options, which includes leaving the choice of sources to the AI. Without them, those chats start with the data source options from your chat options.") @if (this.preselectDataSources) { } } @T("Example Conversation") @T("Add messages of an example conversation (user prompt followed by assistant prompt) to demonstrate the desired interaction pattern. These examples help the AI understand your expectations by showing it the correct format, style, and content of responses before it receives actual user inputs.") @T("Role") @T("Entry") @T("Actions") @context.Role.ToChatTemplateName() @switch(context.Content) { case ContentText textContent: break; case ContentImage { SourceType: ContentImageSource.URL or ContentImageSource.LOCAL_PATH } imageContent: break; default: @T("Unsupported content type") break; } @if (!this.isInlineEditOnGoing && !this.IsReadOnly) { } @if (this.IsReadOnly) { @context.Role.ToChatTemplateName() } else { @foreach (var role in ChatRoles.ChatTemplateRoles()) { @role.ToChatTemplateName() } } @switch(context.Content) { case ContentText textContent: break; default: @T("Only text content is supported in the editing mode yet.") break; } @if (!this.isInlineEditOnGoing && !this.IsReadOnly) { @T("Add a message") } @if (this.IsReadOnly) { @T("Close") } else { @T("Cancel") @if (!this.isInlineEditOnGoing) { @if (this.IsEditing) { @T("Update") } else { @T("Add") } } }