zou-group / textgrad

TextGrad: Automatic ''Differentiation'' via Text -- using large language models to backpropagate textual gradients.
http://textgrad.com/
MIT License
1.81k stars 153 forks source link

Gemini: Authorization through VertexAI instead of API Key #37

Open PizBernina opened 4 months ago

PizBernina commented 4 months ago

For Gemini, seems like only direct API based key authorization is currently enabled? https://github.com/zou-group/textgrad/blob/60198d377b2ef5ad5a4ce4873b126dd8454296e7/textgrad/engine/gemini.py#L30

Trying to access Gemini through Google Vertex API (Google Cloud) gcloud auth application-default login

If I am not missing something, then I might do a PR or maybe someone else is already planning to do so.

mertyg commented 4 months ago

Yes feel free to open a PR with this! Thank you @PizBernina !