@@ -10,6 +10,8 @@ namespace AIStudio.Chat;
10
10
/// </summary>
11
11
public sealed record ChatThread
12
12
{
13
+ private static readonly ILogger < ChatThread > LOGGER = Program . LOGGER_FACTORY . CreateLogger < ChatThread > ( ) ;
14
+
13
15
/// <summary>
14
16
/// The unique identifier of the chat thread.
15
17
/// </summary>
@@ -82,9 +84,8 @@ public sealed record ChatThread
82
84
/// </remarks>
83
85
/// <param name="settingsManager">The settings manager instance to use.</param>
84
86
/// <param name="chatThread">The chat thread to prepare the system prompt for.</param>
85
- /// <param name="logger">The logger instance to use.</param>
86
87
/// <returns>The prepared system prompt.</returns>
87
- public string PrepareSystemPrompt ( SettingsManager settingsManager , ChatThread chatThread , ILogger logger )
88
+ public string PrepareSystemPrompt ( SettingsManager settingsManager , ChatThread chatThread )
88
89
{
89
90
//
90
91
// 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
121
122
// default system prompt:
122
123
chatThread = chatThread with { SystemPrompt = systemPromptTextWithChatTemplate } ;
123
124
124
- logger . LogInformation ( logMessage ) ;
125
+ LOGGER . LogInformation ( logMessage ) ;
125
126
126
127
//
127
128
// Add augmented data, if available:
@@ -139,9 +140,9 @@ public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread ch
139
140
} ;
140
141
141
142
if ( isAugmentedDataAvailable )
142
- logger . LogInformation ( "Augmented data is available for the chat thread." ) ;
143
+ LOGGER . LogInformation ( "Augmented data is available for the chat thread." ) ;
143
144
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." ) ;
145
146
146
147
147
148
//
@@ -177,7 +178,7 @@ public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread ch
177
178
}
178
179
}
179
180
180
- logger . LogInformation ( logMessage ) ;
181
+ LOGGER . LogInformation ( logMessage ) ;
181
182
return systemPromptText ;
182
183
}
183
184
0 commit comments