square / exchange

exchange is a uniform python SDK for message generation with LLMs
9 stars 5 forks source link

Support Google Gemini API as a Provider #67

Open shanehuntley opened 1 month ago

shanehuntley commented 1 month ago

Support Google Gemini as a provider via Gemini API https://ai.google.dev/gemini-api

adhintz commented 1 month ago

Remaining tasks from the PR review:

codefromthecrypt commented 1 month ago

suggest to rename the provider to gemini before releasing, as there's also vertex and may be more in the future.. wdyt? https://www.reddit.com/r/googlecloud/comments/1dr7at1/vertex_ai_api_vs_gemini_api/

also, vision model needs code changes to work, as the images need to be encoded. so, the vision integration test doesn't currently pass

codefromthecrypt commented 1 month ago

here are the VCR tests https://github.com/square/exchange/pull/71

adhintz commented 1 month ago

suggest to rename the provider to gemini before releasing, as there's also vertex and may be more in the future.. wdyt?

Based on this document it looks like there's Google provider and a Vertex provider. Either one can provide the Gemini model.

codefromthecrypt commented 1 month ago

I guess I mean to say we can make more clear which REST Api we are using. If it is implied, no worries