-
Notifications
You must be signed in to change notification settings - Fork 849
Open
Labels
Description
In cases where middleware needs to create content that will be sent back to the consumer which must then include that content in a subsequent request, we should consider introducing some IncludeContent type like:
class IncludeContent : UserInputRequestContent
{
public IList<AIContent>? Content { get; set; }
}
This could be used, for example, by FunctionInvokingChatClient to work around:
extensions/src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs
Lines 48 to 53 in a4a3d80
| /// <para> | |
| /// Due to the nature of interactions with an underlying <see cref="IChatClient"/>, if any <see cref="FunctionCallContent"/> is received | |
| /// for a function that requires approval, all received <see cref="FunctionCallContent"/> in that same response will also require approval, | |
| /// even if they were not <see cref="ApprovalRequiredAIFunction"/> instances. If this is a concern, consider requesting that multiple tool call | |
| /// requests not be made in a single response, by setting <see cref="ChatOptions.AllowMultipleToolCalls"/> to <see langword="false"/>. | |
| /// </para> |