Conversation
🦋 Changeset detectedLatest commit: f67f7f5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces enhanced flexibility for defining structured output in AI model responses by adding support for standard JSON Schema. Users can now specify the expected format of generated content using the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Vertex AI Mock Responses Check
|
Changeset File Check ✅
|
There was a problem hiding this comment.
Code Review
This pull request adds the responseJsonSchema field to GenerationConfig as an alternative to responseSchema for specifying the output format using JSON Schema. The changes include updating the type definitions, API report, and adding validation to prevent simultaneous use of responseSchema and responseJsonSchema. My review includes a suggestion to add further validation to ensure that responseMimeType is correctly set when responseJsonSchema is used, as per the documentation.
|
@rachelsaunders @DellaBitta @hsubox76 This PR introduces a critical bug which makes it impossible to use responseSchema: This block should be checking generationConfig.responseMimeType !== "application/json". Additionally this error message should be explicit about the required value. |
|
Thanks, making a PR to fix. Our next planned release is Apr 9. In the short term, users experiencing this problem should roll back to the previous version (12.10.0), or use patch-package or a similar solution and make the code change in the comment above if you need features in 12.11.0. |
Adds
responseJsonSchemafield, which takes an object in JSON Schema format.Gemini docs examples show how to use the zod library to easily generate this object (https://ai.google.dev/gemini-api/docs/structured-output?example=recipe), and we should follow this with an example of how to do the same, somewhere in the Firebase guides. Maybe this page? https://firebase.google.com/docs/ai-logic/generate-structured-output?api=dev
Tested manually with Developer API and Vertex and both work.
Doc changes: Added text for
responseJsonSchemaand used@remarksto remove bulk of text of bothresponseSchemaandresponseJsonSchemafrom table of contents (full text is still in the section below).Fixes #9625