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
@@ -73,7 +73,8 @@ public sealed class ChatCompletionToolCallAccumulator(Func<ServerSentEvent, ILis
|
||||
|
||||
this.hasReadAnything = true;
|
||||
|
||||
if (!string.IsNullOrEmpty(delta.ReasoningContent))
|
||||
var isReasoning = !string.IsNullOrEmpty(delta.ReasoningContent);
|
||||
if (isReasoning)
|
||||
this.reasoning.Append(delta.ReasoningContent);
|
||||
|
||||
foreach (var toolCallDelta in delta.ToolCalls ?? [])
|
||||
@@ -86,10 +87,12 @@ public sealed class ChatCompletionToolCallAccumulator(Func<ServerSentEvent, ILis
|
||||
|
||||
var textDelta = delta.Content;
|
||||
if (textDelta.Length is 0)
|
||||
return WithSources(string.Empty, sources, usage);
|
||||
return isReasoning
|
||||
? new ChatCompletionStreamPart(string.Empty, sources, usage) { IsReasoning = true }
|
||||
: WithSources(string.Empty, sources, usage);
|
||||
|
||||
this.text.Append(textDelta);
|
||||
return new ChatCompletionStreamPart(textDelta, sources, usage);
|
||||
return new ChatCompletionStreamPart(textDelta, sources, usage) { IsReasoning = isReasoning };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user