We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee9df36 commit 3d57c5cCopy full SHA for 3d57c5c
1 file changed
dotnet/samples/Chat.cs
@@ -6,13 +6,15 @@
6
using var _ = session.On(evt =>
7
{
8
Console.ForegroundColor = ConsoleColor.Blue;
9
- var output = evt switch
+ switch (evt)
10
11
- AssistantReasoningEvent reasoning => $"[reasoning: {reasoning.Data.Content}]",
12
- ToolExecutionStartEvent toolStart => $"[tool: {toolStart.Data.ToolName} {toolStart.Data.Arguments}]",
13
- _ => null
14
- };
15
- if (output != null) Console.WriteLine(output);
+ case AssistantReasoningEvent reasoning:
+ Console.WriteLine($"[reasoning: {reasoning.Data.Content}]");
+ break;
+ case ToolExecutionStartEvent tool:
+ Console.WriteLine($"[tool: {tool.Data.ToolName}]");
16
17
+ }
18
Console.ResetColor();
19
});
20
0 commit comments