@@ -10,6 +10,8 @@ namespace AIStudio.Chat;
1010/// </summary>
1111public sealed record ChatThread
1212{
13+ private static readonly ILogger < ChatThread > LOGGER = Program . LOGGER_FACTORY . CreateLogger < ChatThread > ( ) ;
14+
1315 /// <summary>
1416 /// The unique identifier of the chat thread.
1517 /// </summary>
@@ -82,9 +84,8 @@ public sealed record ChatThread
8284 /// </remarks>
8385 /// <param name="settingsManager">The settings manager instance to use.</param>
8486 /// <param name="chatThread">The chat thread to prepare the system prompt for.</param>
85- /// <param name="logger">The logger instance to use.</param>
8687 /// <returns>The prepared system prompt.</returns>
87- public string PrepareSystemPrompt ( SettingsManager settingsManager , ChatThread chatThread , ILogger logger )
88+ public string PrepareSystemPrompt ( SettingsManager settingsManager , ChatThread chatThread )
8889 {
8990 //
9091 // Use the information from the chat template, if provided. Otherwise, use the default system prompt
@@ -121,7 +122,7 @@ public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread ch
121122 // default system prompt:
122123 chatThread = chatThread with { SystemPrompt = systemPromptTextWithChatTemplate } ;
123124
124- logger . LogInformation ( logMessage ) ;
125+ LOGGER . LogInformation ( logMessage ) ;
125126
126127 //
127128 // Add augmented data, if available:
@@ -139,9 +140,9 @@ public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread ch
139140 } ;
140141
141142 if ( isAugmentedDataAvailable )
142- logger . LogInformation ( "Augmented data is available for the chat thread." ) ;
143+ LOGGER . LogInformation ( "Augmented data is available for the chat thread." ) ;
143144 else
144- logger . LogInformation ( "No augmented data is available for the chat thread." ) ;
145+ LOGGER . LogInformation ( "No augmented data is available for the chat thread." ) ;
145146
146147
147148 //
@@ -177,7 +178,7 @@ public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread ch
177178 }
178179 }
179180
180- logger . LogInformation ( logMessage ) ;
181+ LOGGER . LogInformation ( logMessage ) ;
181182 return systemPromptText ;
182183 }
183184
0 commit comments