What
Add a Google Gemini adapter (adapters/gemini.py) that implements the LLMAdapter interface.
Why
Gemini models are free-tier friendly and widely used. Expanding backend support lowers the barrier to try Agent Constitution.
How
- Copy
adapters/anthropic_api.py as a starting template
- Implement
call() using the google-generativeai Python SDK
- Map response to
LLMResponse
- Add lazy import in
adapters/__init__.py
- Add tests (no real API calls)
- Add
google-generativeai to optional dependencies in pyproject.toml
Reference
adapters/base.py — the interface to implement
adapters/ollama.py — another HTTP-based adapter for reference
What
Add a Google Gemini adapter (
adapters/gemini.py) that implements theLLMAdapterinterface.Why
Gemini models are free-tier friendly and widely used. Expanding backend support lowers the barrier to try Agent Constitution.
How
adapters/anthropic_api.pyas a starting templatecall()using thegoogle-generativeaiPython SDKLLMResponseadapters/__init__.pygoogle-generativeaito optional dependencies inpyproject.tomlReference
adapters/base.py— the interface to implementadapters/ollama.py— another HTTP-based adapter for reference