mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-23 08:33:49 +00:00
Added status texts for prompt processing and reasoning to the chat (#1205)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
6cdb0bc551
commit
28b88580a9
29 files changed
+504
-30
No files matched your search
@@ -63,6 +63,25 @@ public sealed class AnthropicMessageStreamAccumulatorTests
|
||||
Assert.That(shown, Is.False, "What the model thinks stays between it and the next round.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ThinkingSaysThatTheModelReasons()
|
||||
{
|
||||
var accumulator = new AnthropicMessageStreamAccumulator();
|
||||
var parts = Lines(
|
||||
"""{"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":""}}""",
|
||||
"""{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"Let me consider this."}}""",
|
||||
"""{"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}}""",
|
||||
"""{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"The answer."}}""")
|
||||
.Select(accumulator.Process)
|
||||
.ToList();
|
||||
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(parts[1].IsReasoning, Is.True, "A thinking delta tells the user why no text arrives yet.");
|
||||
Assert.That(parts[3].IsReasoning, Is.False, "Text is the answer, not reasoning.");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AThinkingBlockKeepsItsSignature()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user