mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-28 06:02: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>
|
/// <summary>
|
||||||
/// The current system prompt for the chat thread.
|
/// The current system prompt for the chat thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SystemPrompt { get; set; } = string.Empty;
|
public string SystemPrompt { get; init; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The content blocks of the chat thread.
|
/// 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.
|
// We need a way to save the changed system prompt in our chat thread.
|
||||||
// Otherwise, the chatThread will always tell us that it is using the default system prompt.
|
// Otherwise, the chat thread will always tell us that it is using the
|
||||||
chatThread.SystemPrompt = systemPromptTextWithChatTemplate;
|
// default system prompt:
|
||||||
|
chatThread = chatThread with { SystemPrompt = systemPromptTextWithChatTemplate };
|
||||||
|
|
||||||
logger.LogInformation(logMessage);
|
logger.LogInformation(logMessage);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user