mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-27 21:42:56 +00:00
Refactor SystemPrompt property to use init accessor and update chat thread assignment
This commit is contained in:
parent
1223914814
commit
32757989e8
@ -68,7 +68,7 @@ public sealed record ChatThread
|
||||
/// <summary>
|
||||
/// The current system prompt for the chat thread.
|
||||
/// </summary>
|
||||
public string SystemPrompt { get; set; } = string.Empty;
|
||||
public string SystemPrompt { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The content blocks of the chat thread.
|
||||
@ -121,9 +121,10 @@ public sealed record ChatThread
|
||||
}
|
||||
}
|
||||
|
||||
// We need a way to save the changed system prompt in our chatThread.
|
||||
// Otherwise, the chatThread will always tell us that it is using the default system prompt.
|
||||
chatThread.SystemPrompt = systemPromptTextWithChatTemplate;
|
||||
// We need a way to save the changed system prompt in our chat thread.
|
||||
// Otherwise, the chat thread will always tell us that it is using the
|
||||
// default system prompt:
|
||||
chatThread = chatThread with { SystemPrompt = systemPromptTextWithChatTemplate };
|
||||
|
||||
logger.LogInformation(logMessage);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user