cookbook
cookbook copied to clipboard
[New Example] Long Term Memory for Gemini
- Save the preference in the Mem0.AI for the memory layer
- Based on the given user query, search and retrieve similar preferences from the memory layer.
- This example is use case driven that is useful for the recommendation systems and travel or food place planner.
- It uses Gemini as LLM, Qdrant as Vector Store and FastEmbed as Embeddings (open source)
[!NOTE] Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
/gemini review
[!NOTE] Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.
Hi @lucifertrj, thanks for the contribution!
Please keep the example as a Interactive Python Notebook (.ipynb). Notebooks are the standard format for examples in this cookbook.
It looks like the notebook file isn't rendering correctly on GitHub due to a metadata issue.
Could you please try clearing all the cell outputs in your notebook and then pushing the updated file to this PR? That should resolve the rendering issue.
If you're still having trouble, feel free to share a Colab Gist so I can review your work in the meantime.
sure will modify
Hey @chunduriv I have removed the cell outputs.
you can view the notebook here: https://github.com/lucifertrj/cookbook/blob/longtermmemory/examples/Long_Term_Memory.ipynb
For the GitHub gist, you can refer to this: https://colab.research.google.com/gist/lucifertrj/91c7fc265a6d40733c7a99bcf9aaa31d/long_term_memory.ipynb
@Giom-V and @chunduriv any updates? I have formatted the notebook -nbfmt.
@lucifertrj I left you some comments. Basically add more explanations about what's happening. Can you also add a "what's next?" section at the end? I'll just try to run the gemini review, but take it with a grain of salt, it can be a bit picky.
/gemini review
@lucifertrj I left you some comments. Basically add more explanations about what's happening. Can you also add a "what's next?" section at the end? I'll just try to run the gemini review, but take it with a grain of salt, it can be a bit picky.
sure. will make the modifications
@Giom-V I have resolved the comments:
- replace the !pip install to %pip install
- replace GOOGLE_API_KEY to GEMINI_API_KEY
- Switched the embedding model to Google embedding model (previously it was FastEmbed)
- Added more information details for memory add operation and search operation
- Removed the dependency of langchain, earlier we used it for fastembed, now its not needed.
@Giom-V any update?