langchain/tests/unit_tests/chains
vowelparrot 5ca7ce77cd
Remove pythonrepl from LLM-MathChain (#2943)
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
2023-04-16 08:50:32 -07:00
..
__init__.py
test_api.py requests wrapper (#2367) 2023-04-03 21:57:19 -07:00
test_base.py Removed duplicate BaseModel dependencies (#2471) 2023-04-06 12:45:16 -07:00
test_combine_documents.py Use run and arun in place of combine_docs and acombine_docs (#2635) 2023-04-09 18:47:59 -07:00
test_constitutional_ai.py Added constitutional chain. (#1147) 2023-02-18 19:31:51 -08:00
test_conversation.py Add read only shared memory (#1491) 2023-03-12 09:34:36 -07:00
test_hyde.py Removed duplicate BaseModel dependencies (#2471) 2023-04-06 12:45:16 -07:00
test_llm_bash.py skip unit tests that fail in Windows (#2238) 2023-04-01 12:52:21 -07:00
test_llm_checker.py Add LLMCheckerChain (#281) 2022-12-09 12:49:05 -08:00
test_llm_math.py Remove pythonrepl from LLM-MathChain (#2943) 2023-04-16 08:50:32 -07:00
test_llm_summarization_checker.py Harrison/summarizer chain (#1356) 2023-03-01 20:59:07 -08:00
test_llm.py Harrison/guarded output parser (#1804) 2023-03-21 22:07:23 -07:00
test_memory.py Add read only shared memory (#1491) 2023-03-12 09:34:36 -07:00
test_natbot.py Removed duplicate BaseModel dependencies (#2471) 2023-04-06 12:45:16 -07:00
test_sequential.py Removed duplicate BaseModel dependencies (#2471) 2023-04-06 12:45:16 -07:00
test_transform.py Add a Transformation Chain (#257) 2022-12-06 21:58:16 -08:00