Rename embedchain to mem0 and open sourcing code for long term memory (#1474)
Co-authored-by: Deshraj Yadav <deshrajdry@gmail.com>
This commit is contained in:
54
mem0/llms/utils/tools.py
Normal file
54
mem0/llms/utils/tools.py
Normal file
@@ -0,0 +1,54 @@
|
||||
ADD_MEMORY_TOOL = {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "add_memory",
|
||||
"description": "Add a memory",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {"type": "string", "description": "Data to add to memory"}
|
||||
},
|
||||
"required": ["data"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
UPDATE_MEMORY_TOOL = {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "update_memory",
|
||||
"description": "Update memory provided ID and data",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"memory_id": {
|
||||
"type": "string",
|
||||
"description": "memory_id of the memory to update",
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
"description": "Updated data for the memory",
|
||||
},
|
||||
},
|
||||
"required": ["memory_id", "data"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
DELETE_MEMORY_TOOL = {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "delete_memory",
|
||||
"description": "Delete memory by memory_id",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"memory_id": {
|
||||
"type": "string",
|
||||
"description": "memory_id of the memory to delete",
|
||||
}
|
||||
},
|
||||
"required": ["memory_id"],
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user