-
Notifications
You must be signed in to change notification settings - Fork 826
Image generation tool #6749
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?
Image generation tool #6749
Conversation
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 a prototype implementation of ImageGenerationTool with support in the OpenAI provider, enabling AI services to perform image generation when specified as a tool.
- Introduces
ImageGenerationTool
as a marker tool class that can be configured withImageGenerationOptions
- Adds experimental APIs for applying chat response updates to existing responses with configurable coalescing options
- Implements reflection-based handling of OpenAI's internal image generation response types in the OpenAI provider
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ImageGenerationTool.cs | New tool class for enabling image generation capabilities |
ChatResponseUpdateCoalescingOptions.cs | Configuration options for how response updates are merged |
ChatResponseExtensions.cs | Extension methods for applying updates to chat responses |
OpenAIResponsesChatClient.cs | OpenAI provider implementation with image generation support via reflection |
OpenAIJsonContext.cs | Added JSON serialization support for new types |
ChatResponseUpdate.cs | Fixed documentation reference |
ChatResponseUpdateExtensionsTests.cs | Comprehensive tests for new update coalescing functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixes #6639
This adds a prototype implementation of ImageGenerationTool with support in OpenAI provider.
To use this requires using the OpenAI Responses chat client with OpenAI provider (not Azure OpenAI).
Still required:
Microsoft Reviewers: Open in CodeFlow