Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public InvokingContext(IEnumerable<ChatMessage> requestMessages)
/// <value>
/// A collection of <see cref="ChatMessage"/> instances representing new messages that were provided by the caller.
/// </value>
public IEnumerable<ChatMessage> RequestMessages { get; }
public IEnumerable<ChatMessage> RequestMessages { get; set { field = Throw.IfNull(value); } }
}

/// <summary>
Expand Down Expand Up @@ -174,7 +174,7 @@ public InvokedContext(IEnumerable<ChatMessage> requestMessages, IEnumerable<Chat
/// A collection of <see cref="ChatMessage"/> instances representing new messages that were provided by the caller.
/// This does not include any <see cref="AIContextProvider"/> supplied messages.
/// </value>
public IEnumerable<ChatMessage> RequestMessages { get; }
public IEnumerable<ChatMessage> RequestMessages { get; set { field = Throw.IfNull(value); } }

/// <summary>
/// Gets the messages provided by the <see cref="AIContextProvider"/> for this invocation, if any.
Expand All @@ -183,7 +183,7 @@ public InvokedContext(IEnumerable<ChatMessage> requestMessages, IEnumerable<Chat
/// A collection of <see cref="ChatMessage"/> instances that were provided by the <see cref="AIContextProvider"/>,
/// and were used by the agent as part of the invocation.
/// </value>
public IEnumerable<ChatMessage>? AIContextProviderMessages { get; }
public IEnumerable<ChatMessage>? AIContextProviderMessages { get; set; }

/// <summary>
/// Gets the collection of response messages generated during this invocation if the invocation succeeded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public InvokingContext(IEnumerable<ChatMessage> requestMessages)
/// <value>
/// A collection of <see cref="ChatMessage"/> instances representing new messages that were provided by the caller.
/// </value>
public IEnumerable<ChatMessage> RequestMessages { get; }
public IEnumerable<ChatMessage> RequestMessages { get; set { field = Throw.IfNull(value); } }
}

/// <summary>
Expand All @@ -174,7 +174,7 @@ public sealed class InvokedContext
public InvokedContext(IEnumerable<ChatMessage> requestMessages, IEnumerable<ChatMessage> chatMessageStoreMessages)
{
this.RequestMessages = Throw.IfNull(requestMessages);
this.ChatMessageStoreMessages = chatMessageStoreMessages;
this.ChatMessageStoreMessages = Throw.IfNull(chatMessageStoreMessages);
}

/// <summary>
Expand All @@ -184,7 +184,7 @@ public InvokedContext(IEnumerable<ChatMessage> requestMessages, IEnumerable<Chat
/// A collection of <see cref="ChatMessage"/> instances representing new messages that were provided by the caller.
/// This does not include any <see cref="ChatMessageStore"/> supplied messages.
/// </value>
public IEnumerable<ChatMessage> RequestMessages { get; }
public IEnumerable<ChatMessage> RequestMessages { get; set { field = Throw.IfNull(value); } }

/// <summary>
/// Gets the messages retrieved from the <see cref="ChatMessageStore"/> for this invocation, if any.
Expand All @@ -193,7 +193,7 @@ public InvokedContext(IEnumerable<ChatMessage> requestMessages, IEnumerable<Chat
/// A collection of <see cref="ChatMessage"/> instances that were retrieved from the <see cref="ChatMessageStore"/>,
/// and were used by the agent as part of the invocation.
/// </value>
public IEnumerable<ChatMessage> ChatMessageStoreMessages { get; }
public IEnumerable<ChatMessage> ChatMessageStoreMessages { get; set { field = Throw.IfNull(value); } }

/// <summary>
/// Gets or sets the messages provided by the <see cref="AIContextProvider"/> for this invocation, if any.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ private async Task

List<ChatMessage> inputMessagesForChatClient = [];
IList<ChatMessage>? aiContextProviderMessages = null;
IList<ChatMessage>? chatMessageStoreMessages = null;
IList<ChatMessage>? chatMessageStoreMessages = [];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nullable notation should be removed... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes true, it's not required anymore, I can fix in a follow up PR. Thanks!


// Populate the thread messages only if we are not continuing an existing response as it's not allowed
if (chatOptions?.ContinuationToken is null)
Expand Down
Loading