Repository navigation
Handoff Orchestration sample - doesn't work with OpenAI? #12706
Replies: 5 comments
|
Running the same sample with Bedrock/Claude, I get: I modified protected IChatClient AddChatClientToKernel(IKernelBuilder builder)
{
#pragma warning disable CA2000 // Dispose objects before losing scope
IChatClient chatClient;
var bedrock = new AmazonBedrockRuntimeClient();
chatClient = bedrock.AsIChatClient("eu.anthropic.claude-3-7-sonnet-20250219-v1:0");
IChatClient functionCallingChatClient = chatClient.AsBuilder().UseKernelFunctionInvocation().Build();
builder.Services.AddSingleton(functionCallingChatClient);
return functionCallingChatClient;
#pragma warning restore CA2000 // Dispose objects before losing scope
}It looks like the tool back-and-forth results in the last FunctionResultContent becoming transformed into an empty string which gets passed as part of the conversation? Not sure I follow the logic in |
|
Thanks for posting the full conversation log and for trying the Bedrock variant too; having both errors side by side made this quick to trace. On the latest packages (1.80.1, whose
Setup: Step04_Handoff with your Where that message comes from
// The response can potentially be a TOOL message from the Handoff plugin due to the filter
// which will terminate the conversation when a function from the handoff plugin is called.
// Since we don't want to publish that message, so we only publish if the response is an ASSISTANT message.
if (response.Role == AuthorRole.Assistant)In the non-streaming run the handoff turn comes back as an assistant message holding the On 1.60.0 the same slot held an assistant message with blank text, which matches the |
|
The garbage at the end of that call id ( This was a real bug in the Agents.Orchestration preview packages (the internal handoff transfer ran, but the FunctionResultContent wasn't appended before the next model call). It's fixed on recent versions, so first make sure Microsoft.SemanticKernel and the Agents.* packages are all on the same current version. Mixed versions reproduce exactly this failure. If you're already current, enable Trace logging for Microsoft.SemanticKernel and inspect the outgoing request. The missing tool message will be right there, and that's worth filing. — |
Uh oh!
There was an error while loading. Please reload this page.
I've tried to run
Step04_Handoffagainst OpenAI withgpt-4o-2024-08-06. I'm getting this back:All I've done is git clone, set the secrets (
OpenAI:ChatModelIdandOpenAI:ApiKey), thendotnet test --filter Step04_Handoff.Should this just work?
The conversation log:
All reactions