แชร์ผ่าน


FunctionInvokingChatClient.KeepFunctionCallingMessages Property

Definition

Gets or sets a value indicating whether to keep intermediate messages in the chat history.

public:
 property bool KeepFunctionCallingMessages { bool get(); void set(bool value); };
public bool KeepFunctionCallingMessages { get; set; }
member this.KeepFunctionCallingMessages : bool with get, set
Public Property KeepFunctionCallingMessages As Boolean

Property Value

Remarks

When the inner IChatClient returns FunctionCallContent to the FunctionInvokingChatClient, the FunctionInvokingChatClient adds those messages to the list of messages, along with FunctionResultContent instances it creates with the results of invoking the requested functions. The resulting augmented list of messages is then passed to the inner client in order to send the results back. By default, KeepFunctionCallingMessages is true, and those messages will persist in the IList<T> list provided to CompleteAsync(IList<ChatMessage>, ChatOptions, CancellationToken) and CompleteStreamingAsync(IList<ChatMessage>, ChatOptions, CancellationToken) by the caller. Set KeepFunctionCallingMessages to false to remove those messages prior to completing the operation.

Changing the value of this property while the client is in use may result in inconsistencies as to whether function calling messages are kept during an in-flight request.

Applies to