mem0ai / mem0

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

Update main.py so add() returns id of new memory along with message in returned dict. #1714

Closed strueman closed 3 weeks ago

strueman commented 3 weeks ago

changed add(): .......... return {"message": "ok"} to add(): ......... return {"message": "ok", "id":function_result} so that the memory id of the newly created memory is returned in the dict. This is to allow external code to access memory ids when required without having an extra search step for each added memory.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

Checklist:

Maintainer Checklist

CLAassistant commented 3 weeks ago

CLA assistant check
All committers have signed the CLA.

strueman commented 3 weeks ago

Not required