We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de39128 commit b44971fCopy full SHA for b44971f
python/helpers/memory.py
@@ -1,4 +1,3 @@
1
-import ast
2
from datetime import datetime
3
from typing import Any, List, Sequence
4
from langchain.storage import InMemoryByteStore, LocalFileStore
@@ -392,7 +391,7 @@ def _save_db_file(db: MyFaiss, memory_subdir: str):
392
391
def _get_comparator(condition: str):
393
def comparator(data: dict[str, Any]):
394
try:
395
- return ast.literal_eval(condition, {}, data)
+ return eval(condition, {}, data)
396
except Exception as e:
397
# PrintStyle.error(f"Error evaluating condition: {e}")
398
return False
0 commit comments