[Feature] Google GenAI SDK
What feature would you like to see?
Google has released a unified SDK for both Gemini and Vertex AI that has the newest models. I'm currently evaluating frameworks to move forward with, and we'd love to get going with DSPy. However this LLM is critical for us.
https://googleapis.github.io/python-genai/
Would you like to contribute?
- [ ] Yes, I'd like to help implement this.
- [ ] No, I just want to request it.
Additional Context
No response
I'm flexible and happy to help. However I'm also low on time.
Hi @TheMellyBee , thanks for raising this!
DSPy LM queries go through LiteLLM, which does support both Gemini and VertexAI in their providers (saw some example snippets here).
Does the newly-released SDK require a different provider? Raising this with LiteLLM would be the best way to integrate with DSPy!
It does! This is a new unified API that will allow API keys from either of those. It also cleaned things up quite a bit. Moving forward they will be removing support for the other SDK. I've gone ahead and requested this feature with LiteLLM
You can also subclass from dspy.BaseLM to make your own LM that under the hood uses google-genai: https://github.com/stanfordnlp/dspy/blob/6ee8cdca4bf3283a8bde6b92c628cbbd0851fe9b/dspy/clients/base_lm.py#L28