mem0ai / mem0

The Memory layer for your AI apps
https://mem0.ai
Apache License 2.0
21.6k stars 1.97k forks source link

Failed to add batch due to a bad request: Object of type function is not JSON serializable #1736

Open olegius88 opened 3 weeks ago

olegius88 commented 3 weeks ago

🐛 Describe the bug

🐛 Describe the bug

I get an error when calling the add method: Failed to add batch due to a bad request: Object of type function is not JSONserializable

I use the code from the example https://github.com/mem0ai/mem0/tree/main/embedchain/examples/api_server

launched in docker

OS: Ubuntu 24.04 LTS (GNU/Linux 6.8.0-41-generic x86_64) Docker version 27.1.2, build d01f264

изображение

Could there be a problem related to OpenAI?

The error does not change if I intentionally specify an invalid OPENAI_API_KEY

But my key is definitely working. On the same server, other projects using OpenAI are working fine