fix: Update SKChatCompletionAdapter message conversion #5749
+267
−67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
The PR introduces two changes.
The first change is adding a name attribute to
FunctionExecutionResult
. The motivation is that semantic kernel requires it for their function result interface and it seemed like a easy modification asFunctionExecutionResult
is always created in the context of aFunctionCall
which will contain the name. I'm unsure if there was a motivation to keep it out but this change makes it easier to trace which tool the result refers to and also increases api compatibility with SK.The second change is an update to how messages are mapped from autogen to semantic kernel, which includes an update/fix in the processing of function results.
Related issue number
Related to #5675 but wont fix the underlying issue of anthropic requiring tools during AssistantAgent reflection.
Checks