mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-04 10:26:27 +00:00
Added settings for chat compression, with a model of its own (#1241)
This commit is contained in:
1 parent
899139c88b
commit
1fbc1f4796
71 files changed
+3023
-797
No files matched your search
@@ -259,6 +259,21 @@ public sealed class ChatCompressionTests
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WithinTheSameChatTheMessageBeingWrittenStays()
|
||||
{
|
||||
var chat = Chat(
|
||||
Block(ChatRole.USER, "First question", 1),
|
||||
Block(ChatRole.AI, "First answer", 2),
|
||||
Block(ChatRole.USER, "Second question", 3),
|
||||
Block(ChatRole.AI, "Second answer", 4));
|
||||
chat.Draft.SetText("The message being written");
|
||||
|
||||
ChatCompression.TurnIntoContinuation(chat, 0, ChatCompressionTarget.SAME_CHAT, "The summary", ChatRestrictions.NONE, "provider-1");
|
||||
|
||||
Assert.That(chat.Draft.Text, Is.EqualTo("The message being written"), "A chat compressed before sending sends this message right afterward.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheLastMessageFollowsTheSummaryUnchanged()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user