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

Fix not working with Gemini models #2021

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lh0x00
Copy link

@lh0x00 lh0x00 commented Nov 9, 2024

Description

This PR's did the following:

  • Fixed missing gemini in LLM's provider check.
  • Handled case where model returns json in code block.
  • Fixed Gemini model not working: removed unnecessary noop, updated function to parse function calls returning Gemini (based on their source code/docs).

All tested by my app working properly again.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

@CLAassistant
Copy link

CLAassistant commented Nov 9, 2024

CLA assistant check
All committers have signed the CLA.

@lh0x00
Copy link
Author

lh0x00 commented Nov 9, 2024

@Dev-Khant Gemini will not be available for now, I hope you consider and merge it soon if possible.

@spike-spiegel-21 spike-spiegel-21 self-assigned this Nov 9, 2024
mem0/llms/configs.py Outdated Show resolved Hide resolved
@spike-spiegel-21 spike-spiegel-21 added the lgtm This PR has been approved by a maintainer label Nov 9, 2024
@lh0x00 lh0x00 changed the title Add missing LLM providers Fix not working with Gemini models Nov 9, 2024
@lh0x00
Copy link
Author

lh0x00 commented Nov 9, 2024

@spike-spiegel-21 @Dev-Khant While working on the library I resolved some related bugs so that Gemini could work with mem0 as documented.

mem0/llms/gemini.py Outdated Show resolved Hide resolved
mem0/llms/gemini.py Outdated Show resolved Hide resolved
@lh0x00
Copy link
Author

lh0x00 commented Nov 15, 2024

@Dev-Khant I updated to resolve test fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants