Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Gemini (Rest API) Integration #135

Closed
10 tasks done
Tracked by #6667
TuanaCelik opened this issue Dec 20, 2023 · 6 comments
Closed
10 tasks done
Tracked by #6667

Google Gemini (Rest API) Integration #135

TuanaCelik opened this issue Dec 20, 2023 · 6 comments
Assignees
Labels
new integration Discuss the creation of a new integration in Core P1

Comments

@TuanaCelik
Copy link
Member

TuanaCelik commented Dec 20, 2023

Summary and motivation

Google Gemini isn't only provided via Vertex AI. Let's create an integration for the REST API offering, too. There you only need a simple API Key - no need for a GCP account.

Checklist

If the request is accepted, ensure the following checklist is complete before closing this issue.

  • The code was merged in the main branch
  • Docs are published at https://docs.haystack.deepset.ai/
  • There is a Github workflow running the tests for the integration nightly and at every PR
  • A label named like integration:<your integration name> has been added to this repo
  • The labeler.yml file has been updated
  • The package has been released on PyPI
  • An integration tile has been added to https://github.com/deepset-ai/haystack-integrations
  • The integration has been listed in the Inventory section of this repo README
  • There is an example available to demonstrate the feature
  • The feature was announced through social media
@TuanaCelik TuanaCelik added the new integration Discuss the creation of a new integration in Core label Dec 20, 2023
@TuanaCelik TuanaCelik changed the title Google Gemini (Rest API Integration Google Gemini (Rest API) Integration Dec 20, 2023
@silvanocerza
Copy link
Contributor

silvanocerza commented Dec 20, 2023

To support Gemini through Makersuite we will probably need to use a different library from the one used in Vertex AI.

We'll need google-generativeai, at least version 0.3.1. This because the google-cloud-aiplatform library used in the Google Vertex AI integration doesn't support Makersuite. Documentation is over here. Library repo here. Here to get the API key instead.

Also note that Makersuite is only available in the USA.

@masci masci added the P1 label Dec 21, 2023
@mathislucka mathislucka added this to the 2.0 Generators milestone Dec 22, 2023
@TuanaCelik
Copy link
Member Author

Would the ideal name for this integration be gemini-haystack or makersuite-haystack or something else? Wdyt?

@TuanaCelik
Copy link
Member Author

Expanding on the comment above: especially if we want to document all of these integrations (which we do), we might end up wanting to rethink how we name them. E.g., in the google-vertexai-haystack integration we have the GeminiGeneroator, if this is to be a separate integration here, we probably want to start naming them to be explicit in how they're using Gemini??

E.g.: VertexAIGeminiGenerator and MakersuiteGeminiGenerator - I may be well off here.. Lmk what you think

@TuanaCelik
Copy link
Member Author

Here's the draft PR when someone from core is back to finalize it: #156

It has an example notebook in there. Works with:

  • gemini-pro for just tex
  • gemini-pro-vision for text + image
  • GeminiChatGenerator for function calling

Needs:

  • probably lots of name/package name changes to distinguish from the vertex counterpart
  • tests :)
    Leaving it in draft in case you'd rather bin it

@TuanaCelik
Copy link
Member Author

@dfokina @silvanocerza Let's get the docs going. Feel free to assign to me if needed. I can also take the example/demonstration.
@bilgeyucel or @annthurium do one of you have room for the integration page? Or to switch the demo with me?

@dfokina
Copy link
Contributor

dfokina commented Jan 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new integration Discuss the creation of a new integration in Core P1
Projects
None yet
Development

No branches or pull requests

5 participants