Table of Contents

Method RemoveUnfinishedToolExchanges

Namespace
Oscova.Agents.Conversations
Assembly
Oscova.Agents.dll

RemoveUnfinishedToolExchanges(IEnumerable<ChatMessage>)

Copies history while retaining only tool calls and results that have a matching counterpart.

[SuppressMessage("Design", "MA0016", Justification = "SetInMemoryChatHistory takes a List<ChatMessage>.")]
public static List<ChatMessage> RemoveUnfinishedToolExchanges(IEnumerable<ChatMessage> history)

Parameters

history IEnumerable<ChatMessage>

Returns

List<ChatMessage>