mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 16:07:22 +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
@@ -241,6 +241,15 @@ public sealed record ChatThread
|
||||
/// </summary>
|
||||
public string SystemPrompt { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Which assistant chose the system prompt of this chat, and how; null when the chat got its prompt elsewhere.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Set when a chat continues the conversation of an assistant, see AssistantBase.ChatSystemPrompt, so that
|
||||
/// the dialog showing the system prompt names the assistant rather than calling it the prompt of this chat.
|
||||
/// </remarks>
|
||||
public ChatSystemPromptOrigin? SystemPromptOrigin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The content blocks of the chat thread.
|
||||
/// </summary>
|
||||
@@ -414,7 +423,7 @@ public sealed record ChatThread
|
||||
|
||||
parts.Add(usesChatTemplate
|
||||
? new(SystemPromptPartKind.CHAT_TEMPLATE, systemPromptTextWithChatTemplate) { SourceName = chatTemplate.Name }
|
||||
: new(SystemPromptPartKind.BASE_PROMPT, systemPromptTextWithChatTemplate));
|
||||
: new(SystemPromptPartKind.BASE_PROMPT, systemPromptTextWithChatTemplate) { Origin = this.SystemPromptOrigin });
|
||||
|
||||
//
|
||||
// Add augmented data, if available:
|
||||
|
||||
Reference in new issue
Block a user