mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 06:08:19 +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
@@ -15,7 +15,10 @@ public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
|
||||
|
||||
protected override string Description => T("This coding assistant supports you in writing code. Ask your coding question and optionally attach source files as context. When you have compiler messages, you can paste them into the input fields to get help with debugging as well.");
|
||||
|
||||
protected override string SystemPrompt =>
|
||||
// This prompt describes a developer for any coding question, which suits the follow-up questions of the chat:
|
||||
protected override ChatSystemPromptChoice ChatSystemPrompt => ChatSystemPromptChoice.ASSISTANT;
|
||||
|
||||
protected override string SystemPrompt =>
|
||||
"""
|
||||
You are a friendly, helpful senior software developer with extensive experience in various programming languages
|
||||
and concepts. You are familiar with principles like DRY, KISS, YAGNI, and SOLID and can apply and explain them.
|
||||
@@ -48,12 +51,7 @@ public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
|
||||
{
|
||||
var originalChatThread = this.ChatThread ?? new ChatThread();
|
||||
if (string.IsNullOrWhiteSpace(this.SendToChatVisibleUserPromptText))
|
||||
{
|
||||
return originalChatThread with
|
||||
{
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
}
|
||||
return originalChatThread;
|
||||
|
||||
var earliestBlock = originalChatThread.Blocks.MinBy(x => x.Time);
|
||||
var visiblePromptTime = earliestBlock is null
|
||||
@@ -85,7 +83,6 @@ public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
|
||||
{
|
||||
ChatId = Guid.NewGuid(),
|
||||
Name = T("Coding Assistant Session"),
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
Blocks = transferredBlocks,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user