-
Notifications
You must be signed in to change notification settings - Fork 658
[AI] Add support for Thinking Levels #7599
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
Conversation
Gemini 2.5 series models and newer utilize a thinking process before generating a response. Thinking levels are an alternative to thinking budgets as they are preset values that Gemini 3 models can use to limit how many tokens are dedicated to the thinking process. The [thinking documentation](https://firebase.google.com/docs/ai-logic/thinking) gives more details.
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. |
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected ProductsNo changes between base commit (a41dfcf) and merge commit (82a83c3).Test Logs |
|
The public api surface has changed for the subproject firebase-ai: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
Size Report 1Affected ProductsTest Logs |
|
The public api surface has changed for the subproject firebase-ai: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ThinkingConfig.kt
Outdated
Show resolved
Hide resolved
We couldn't keep the implementation where it was originally placed due to java compatibility issues. Custom setters, necessary to enable checks in place when using the build pattern, are not compatible with `@JvmField`s Also, added tests.
firebase-ai/src/test/java/com/google/firebase/ai/GenerativeModelTesting.kt
Outdated
Show resolved
Hide resolved
firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ThinkingConfig.kt
Outdated
Show resolved
Hide resolved
Remove print statement from request text validation.
Gemini 3 models support thinking levels, an alternative to thinking budgets. They are preset values that can use to limit how many tokens are dedicated to the thinking process.
The thinking documentation gives more details.