Signed-off-by: Alexander Trauzzi <acj@trauzzi.me>
This commit is contained in:
Alexander Trauzzi 2025-09-03 07:34:07 -05:00
parent d525041729
commit 569c99e5ee
2 changed files with 2 additions and 20 deletions

View File

@ -48,7 +48,7 @@ foreach (var output in response.Outputs)
{
foreach (var choice in output.Choices)
{
Console.WriteLine($" {choice.Message}");
Console.WriteLine($" {choice.Message.Content}");
foreach (var toolCall in choice.Message.ToolCalls)
{
@ -63,21 +63,3 @@ foreach (var output in response.Outputs)
}
}
}
// note: Alternative, for the LINQ inclined.
// response.Outputs
// .SelectMany((output) => output.Choices)
// .ToList()
// .ForEach((choice) =>
// {
// Console.WriteLine($" {choice.Message}");
//
// choice.Message.ToolCalls.ToList().ForEach((toolCall) =>
// {
// Console.WriteLine(toolCall switch
// {
// CalledToolFunction calledToolFunction => $"\t\tId: {calledToolFunction.Id}, Name: {calledToolFunction.Name}, Arguments: {calledToolFunction.JsonArguments}",
// _ => $"\t\tId: {toolCall.Id}",
// });
// });
// });

View File

@ -6,4 +6,4 @@ apps:
appID: conversation
daprHTTPPort: 3500
daprGRPCPort: 50001
command: ["dotnet", "run"]
command: ["dotnet", "run"]