Add support for Google AI Studio / Gemini API - #9
Closed
mlennie wants to merge 3 commits into
Closed
Conversation
… flavor Phase 3.1 Complete: Python SDK Updates Changes: - Updated flavor_to_provider mapping: 'gemini_chat' now maps to 'gemini' instead of 'vertex' - This enables customers to use Gemini API with simple API key authentication - Separate from Vertex AI which uses GCP credentials Files Modified: - src/freeplay/resources/prompts.py: Changed mapping (1 line) - tests/test_freeplay.py: Updated test data + added test_flavor_to_provider_mapping() - CHANGELOG.md: Updated documentation example Test Results: - 144/144 tests passing (added 1 new test) - Type check: PASSED (0 new errors) - Linting: PASSED - New test specifically validates gemini_chat → gemini mapping Impact: Customers can now use Gemini API templates with API keys: template = client.prompts.get(...) response = template.call(llm_api_key='gemini-api-key') This works alongside existing Vertex AI support which continues to use GCP authentication for customers who prefer that approach.
Add Gemini API provider support and update tests, docs, and REPL argument forwarding in recordings.py, tests/test_freeplay.py, README.md, and MakefileIntroduce 📍Where to StartStart with the Macroscope summarized 14d91b0. |
- Revert flavor mapping to 'vertex' for backward compatibility - Add comprehensive documentation for Gemini vs Vertex AI - Create gemini_api_example.py demonstrating both providers - Update CHANGELOG with additive Gemini API support section - Update README with provider comparison table - Add docstring to CallInfo documenting supported providers - Update Makefile to accept ARGS parameter for repl command BREAKING CHANGE: None - both providers fully supported
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: https://linear.app/freeplay/issue/ENG-4726/add-support-for-google-ai-studio-gemini-api