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

Implemented Gemini (#1490) #1965

Merged
merged 12 commits into from
Oct 21, 2024
Merged

Implemented Gemini (#1490) #1965

merged 12 commits into from
Oct 21, 2024

Conversation

into-the-night
Copy link
Contributor

@into-the-night into-the-night commented Oct 16, 2024

Description

Added support for Gemini using google-generativeai module. (sorry it took so long 👍)

Fixes #1490

Type of change

  • [✅] New feature (non-breaking change which adds functionality)
  • [✅] Documentation update

How Has This Been Tested?

Also added unit test for Gemini in tests/llms/test_gemini_llm.py

Please delete options that are not relevant.

  • [✅] Unit Test

Checklist:

  • [✅] My code follows the style guidelines of this project
  • [✅] I have performed a self-review of my own code
  • [✅] I have commented my code, particularly in hard-to-understand areas
  • [✅] I have made corresponding changes to the documentation
  • [✅] My changes generate no new warnings
  • [✅] I have added tests that prove my fix is effective or that my feature works
  • [✅] New and existing unit tests pass locally with my changes
  • [?] Any dependent changes have been merged and published in downstream modules
  • [✅] I have checked my code and corrected any misspellings

Maintainer Checklist

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2024

CLA assistant check
All committers have signed the CLA.

@into-the-night into-the-night mentioned this pull request Oct 16, 2024
@deshraj deshraj requested a review from Dev-Khant October 16, 2024 15:37
merge main from mem0ai/mem0
@into-the-night
Copy link
Contributor Author

into-the-night commented Oct 17, 2024

I have a doubt. I noticed there is already a Google AI mentioned in the docs (using litellm), should I add Gemini as a seperate page to the docs or update the Google AI page? @Dev-Khant

@Dev-Khant
Copy link
Member

I have a doubt. I noticed there is already a Google AI mentioned in the docs (using litellm), should I add Gemini as a seperate page to the docs or update the Google AI page? @Dev-Khant

Hey Thanks for the PR, you should litellm gemini with your new doc page.

pyproject.toml Outdated Show resolved Hide resolved
mem0/llms/gemini.py Outdated Show resolved Hide resolved
Copy link
Member

@Dev-Khant Dev-Khant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to make changes to mint.json for updating doc page.

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Member

@Dev-Khant Dev-Khant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that .lock file remains same as there is no change in pyproject.toml.

@into-the-night
Copy link
Contributor Author

Make sure that .lock file remains same as there is no change in pyproject.toml.

I see there have been a few changes in the poetry.lock file as some packages have been updated, this is poetry's doing. When you say poetry add openai=^x.xx it shows openai ="^x.xx" in the pyproject.toml but actually installs the latest version of the package. Its fixed now.

@Dev-Khant
Copy link
Member

Hey @into-the-night pyproject.toml still looks odd. Can you please check and remove changes from .toml and .lock files if not necessary.

@into-the-night
Copy link
Contributor Author

into-the-night commented Oct 21, 2024

Wow that was pretty sneaky but something new to learn about line-endings. here you go @Dev-Khant, no diffs in .toml and .lock files.

@Dev-Khant
Copy link
Member

LGTM!! Thanks @into-the-night for the quick resolution and for the contribution!

@Dev-Khant Dev-Khant merged commit 078aa66 into mem0ai:main Oct 21, 2024
5 checks passed
@into-the-night
Copy link
Contributor Author

Thank you so much for your patience😁 we go up brick by brick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gemini Support?
3 participants