refactor: Remove JSON constant for common method (#1680)

This commit is contained in:
Ethan Knox
2024-08-26 16:47:41 -04:00
committed by GitHub
parent 7f589eaf63
commit 0491a8bbe3
39 changed files with 368 additions and 320 deletions

View File

@@ -1,8 +1,8 @@
import json
import memgpt.system as system
from memgpt.constants import JSON_ENSURE_ASCII
from memgpt.local_llm.function_parser import patch_function
from memgpt.utils import json_dumps
EXAMPLE_FUNCTION_CALL_SEND_MESSAGE = {
"message_history": [
@@ -32,7 +32,7 @@ EXAMPLE_FUNCTION_CALL_CORE_MEMORY_APPEND_MISSING = {
"content": "I'll append to memory.",
"function_call": {
"name": "core_memory_append",
"arguments": json.dumps({"content": "new_stuff"}, ensure_ascii=JSON_ENSURE_ASCII),
"arguments": json_dumps({"content": "new_stuff"}),
},
},
}