mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
5ca7ce77cd
Use numexpr evaluate instead of the python REPL to avoid malicious code injection. Tested against the (limited) math dataset and got the same score as before. For more permissive tools (like the REPL tool itself), other approaches ought to be provided (some combination of Sanitizer + Restricted python + unprivileged-docker + ...), but for a calculator tool, only mathematical expressions should be permitted. See https://github.com/hwchase17/langchain/issues/814 |
||
---|---|---|
.. | ||
agents | ||
callbacks | ||
chains | ||
data | ||
docstore | ||
document_loader | ||
evaluation | ||
llms | ||
output_parsers | ||
prompts | ||
tools | ||
utilities | ||
__init__.py | ||
test_bash.py | ||
test_formatting.py | ||
test_python.py | ||
test_sql_database_schema.py | ||
test_sql_database.py | ||
test_text_splitter.py |