Skip to content

Commit d548c0c

Browse files
authored
Refine comments in UpdateCacheAsync method (#163)
2 parents 29a2c25 + a77374f commit d548c0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ChatGptNet/ChatGptClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,14 @@ private async Task AddAssistantResponseAsync(Guid conversationId, IList<ChatGptM
392392
private async Task UpdateCacheAsync(Guid conversationId, IEnumerable<ChatGptMessage> messages, CancellationToken cancellationToken = default)
393393
{
394394
// If the maximum number of messages has been reached, deletes the oldest ones.
395-
// Note: system message does not count for message limit.
395+
// Note: the system message does not count for message limit.
396396
var conversation = messages.Where(m => m.Role != ChatGptRoles.System);
397397

398398
if (conversation.Count() > options.MessageLimit)
399399
{
400400
conversation = conversation.TakeLast(options.MessageLimit);
401401

402-
// If the first message was of role system, adds it back in.
402+
// If the first message had the system role, adds it back in.
403403
var firstMessage = messages.First();
404404
if (firstMessage.Role == ChatGptRoles.System)
405405
{

0 commit comments

Comments
 (0)