Add FunctionInvokingChatClient.CurrentContext#5786
Conversation
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/FunctionInvokingChatClientTests.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/FunctionInvokingChatClientTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs:670
- Ensure that CurrentContext is reset appropriately after the function invocation to avoid unintended side effects.
CurrentContext = context;
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=912643&view=codecoverage-tab |
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=912705&view=codecoverage-tab |
Allows AI functions to access the current
FunctionInvokingChatClient.FunctionInvocationContext.This can be used to access the chat history or terminate the function invocation loop.
Fixes #5705
Microsoft Reviewers: Open in CodeFlow