Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1.Build a personalized Agent AI using Spoon for conversation flow and Mem0 for memory retention(spoon-core/examples/mem0_agent_demo.py)
2.Mem0 provides a suite of tools for storing, searching, and retrieving memories, enabling agents to maintain context and learn from past interactions. The tools are built as Spoon toolkit, making them easily integrable with any AI agent implementation.(spoon-core/examples/mem0_tool_agent.py)
3.Some models occasionally return arguments: null instead of an empty JSON object {}.In _convert_response inside openai_compatible_provider.py, the method passes this None from the API directly into the Function object when constructing it.In spoon_ai/schema.py, the Function model usually declares arguments: str. When Pydantic receives None for this field, it raises a validation error.
Solution:Add defensive logic in the _convert_response method: if arguments is None, force it to "{}" before constructing the Function object.(spoon-core/spoon_ai/llm/providers/openai_compatible_provider.py)
4.Updated pyproject.toml (and requirements.txt) to add mem0ai under [project.optional-dependencies].