Added context compression (#1198)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
j-erlerandThorsten Sommer authored and GitHub committed 2026-11-21 14:16:04 +01:00
1 parent 28b88580a9
commit 8a4a26503b
54 files changed
+4582 -56

No files matched your search

@@ -0,0 +1,14 @@
namespace AIStudio.Chat.Compression;
/// <summary>
/// The summary the AI wrote of a chat, or why there is none.
/// </summary>
/// <param name="Success">Whether there is a summary.</param>
/// <param name="Summary">The summary, as the AI wrote it. Not filtered for prompt injections yet.</param>
/// <param name="Issue">Why there is no summary, for the user. Empty on success.</param>
public sealed record ChatCompressionResult(bool Success, string Summary, string Issue)
{
public static ChatCompressionResult Succeeded(string summary) => new(true, summary, string.Empty);
public static ChatCompressionResult Failed(string issue) => new(false, string.Empty, issue);
}