You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example, it is currently not possible to retrieve the function call and function call results so that you can add it to your own ChatHistory object.
// Create kernelvarbuilder= Kernel.CreateBuilder();
builder.WithCompletionService();
builder.Services.AddLogging(c => c.AddDebug().SetMinimumLevel(LogLevel.Trace));
builder.Plugins.AddFromType<LightPlugin>();varkernel= builder.Build();ChatCompletionAgentagent=new(){Name="HomeAssistant",Instructions="You are a home assistant. You can help with home-related tasks.",Kernel=kernel,ExecutionSettings=new OpenAIPromptExecutionSettings(){ToolCallBehavior= ToolCallBehavior.AutoInvokeKernelFunctions },};// Create chat historyChatHistoryhistory=[];while(true){// Get user input
Console.Write("User > ");
history.AddMessage(
AuthorRole.User,
Console.ReadLine()!);varresults= agent.InvokeAsync(history);awaitforeach(var content in results){
Console.WriteLine("Assistant > "+content);
history.AddMessage(AuthorRole.Assistant, content.ToString());}}
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
When using InvokeAsync on an agent, function call and function call results are missing
.Net: When using InvokeAsync on an agent, function call and function call results are missing
Apr 29, 2024
In the following example, it is currently not possible to retrieve the function call and function call results so that you can add it to your own
ChatHistory
object.The text was updated successfully, but these errors were encountered: