mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 21:47:21 +00:00
Fixed and improved the system prompt of chats started from assistants (#1172)
This commit is contained in:
1 parent
bbf4dc2231
commit
31862f5ecd
50 files changed
+1112
-107
No files matched your search
@@ -14,12 +14,32 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
|
||||
|
||||
protected override string Description => T("Provide a list of bullet points and some basic information for an e-mail. The assistant will generate an e-mail based on that input.");
|
||||
|
||||
// The prompt of this assistant describes an automated system which only writes the email, so the chat gets a prompt of its own, which keeps the settings of the email:
|
||||
protected override ChatSystemPromptChoice ChatSystemPrompt => ChatSystemPromptChoice.Custom(this.CreateChatSystemPrompt);
|
||||
|
||||
protected override string SystemPrompt =>
|
||||
$"""
|
||||
You are an automated system that writes emails. {this.SystemPromptHistory()} The user provides you with bullet points on what
|
||||
he want to address in the response. Regarding the writing style of the email: {this.selectedWritingStyle.Prompt}
|
||||
{this.SystemPromptGreeting()} {this.SystemPromptName()} You write the email in the following language: {this.SystemPromptLanguage()}.
|
||||
""";
|
||||
|
||||
/// <summary>
|
||||
/// Creates the system prompt of a chat which continues an email, for follow-up questions about it.
|
||||
/// </summary>
|
||||
private string CreateChatSystemPrompt() =>
|
||||
$"""
|
||||
You are an expert in writing emails. The user had an email written: the conversation so far holds the bullet
|
||||
points of the user, the previous conversation when the user gave one, and the email. Now you answer the user's
|
||||
follow-up questions about the email, e.g., why it is worded a certain way, and you revise it when the user asks
|
||||
for it. A revised version is always the complete email.
|
||||
|
||||
The user chose these settings for the email, which a revised version keeps unless the user asks otherwise:
|
||||
Regarding the writing style of the email: {this.selectedWritingStyle.Prompt}
|
||||
{this.SystemPromptGreeting()} {this.SystemPromptName()} You write the email in the following language: {this.SystemPromptLanguage()}.
|
||||
|
||||
Answer questions in the language the user writes in.
|
||||
""";
|
||||
|
||||
protected override IReadOnlyList<IButtonData> FooterButtons => [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user