-
Notifications
You must be signed in to change notification settings - Fork 2
Use Gemini's reasoning features #124
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
…prompto into update-gemini-sdk
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 enhances the Gemini integration to capture and return the model’s intermediate “thoughts” alongside its final answer, refactors client management for model-specific API keys, and updates media upload/settings helpers.
- Introduce
_process_answer_and_thoughts,process_thoughts, and recordthinking_textin all query paths - Add
_get_clientto cachegoogle.genai.Clientinstances per model and deriveThinkingConfig - Refactor media-upload scripts to synchronous APIs and add
_create_settings
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/prompto/apis/gemini/gemini_utils.py | Extract thoughts, consolidate response parsing |
| src/prompto/apis/gemini/gemini.py | Use new client API, record thinking_text |
| src/prompto/apis/gemini/gemini_media.py | Refactor upload/delete/list to sync, rename |
| src/prompto/upload_media.py | Add _create_settings, remove async runner |
| tests/apis/gemini/… | Expand tests for reasoning, update mocks |
| pyproject.toml | Reorder/sync dependencies |
Comments suppressed due to low confidence (1)
src/prompto/apis/gemini/gemini_media.py:108
- Variable name
genmini_apilooks like a typo. Rename togemini_apifor consistency.
genmini_api = GeminiAPI(settings=settings, log_file=None)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 65.09% 67.80% +2.70%
==========================================
Files 44 44
Lines 2679 2733 +54
==========================================
+ Hits 1744 1853 +109
+ Misses 935 880 -55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.