-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document data passing mechanisms for AIFunction delegates #49895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation on data passing mechanisms for AI function delegates in response to issue #48469, addressing an information gap in the function calling quickstart guide.
- Documents four mechanisms to pass contextual data to AI function delegates
- Adds code examples demonstrating AIFunctionArguments, IServiceProvider, CurrentContext, and custom parameter binding
- Updates the date from March 2025 to November 2025
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/ai/quickstarts/use-function-calling.md | Adds a new "Pass data to AI functions" section with four subsections documenting different data passing mechanisms (AIFunctionArguments, IServiceProvider, CurrentContext, and custom parameter binding) |
| docs/ai/quickstarts/snippets/function-calling/openai/AdvancedDataPassing.cs | Adds new code example file with four snippets demonstrating each data passing mechanism, plus supporting executable code and type definitions |
Comments suppressed due to low confidence (1)
docs/ai/quickstarts/use-function-calling.md:8
- According to the .NET documentation guidelines for Markdown files, this file should include an
ai-usagefrontmatter key/value pair to disclose that it was created with the assistance of AI. Add the following to the frontmatter:
ai-usage: ai-assisted---
title: Quickstart - Extend OpenAI using Tools and execute a local Function with .NET
description: Create a simple chat app using OpenAI and extend the model to execute a local function.
ms.date: 11/13/2025
ms.topic: quickstart
zone_pivot_groups: openai-library
# CustomerIntent: As a .NET developer new to OpenAI, I want deploy and use sample code to interact to learn from the sample code how to extend the model using Tools.
---
Summary
Adds documentation for four mechanisms to pass contextual data to AIFunction delegates, addressing information gap identified in dotnet/extensions#6804.
Fixes #48469
Changes
Code Example
All code examples compile against current Microsoft.Extensions.AI API.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews