-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.Net: Add responseMimeType Parameter to GeminiPromptExecutionSettings…
… for Enhanced Output Control. (#9870) ### Motivation and Context **Why is this change required?** The absence of the `responseMimeType` property in .NET prevented users from leveraging structured output formats available in the Gemini API, causing unintended behavior in scenarios requiring JSON or controlled output. **What problem does it solve?** Adds flexibility for developers by enabling control over MIME type responses, particularly for JSON data parsing and classification tasks. **What scenario does it contribute to?** - Requests with structured response needs, such as JSON objects or controlled classification outputs. - Seamless migration and parity with the Python SDK's `responseMimeType` support. Fixes #9863 ### Description This PR adds support for the optional `responseMimeType` parameter to the `GeminiPromptExecutionSettings` class, allowing for better control over the output response format in Gemini API calls. This change addresses the missing ability to specify MIME types for valid JSON, plain text, or enumerated outputs. ### Contribution Checklist - [Y] The code builds clean without any errors or warnings - [Y] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [Y] All unit tests pass, and I have added new tests where possible - [Y] I didn't break anyone 😄 Co-authored-by: Adit Sheth <[email protected]>
- Loading branch information
1 parent
e0042af
commit 3b8a7c2
Showing
5 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters