Package dev.langchain4j.code.graalvm
Class GraalVmPythonExecutionEngine
java.lang.Object
dev.langchain4j.code.graalvm.GraalVmPythonExecutionEngine
- All Implemented Interfaces:
CodeExecutionEngine
CodeExecutionEngine
that uses GraalVM Polyglot/Truffle to execute provided Python code.
Attention! It might be dangerous to execute the code, see SandboxPolicy.TRUSTED
and HostAccess.UNTRUSTED
for more details.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
GraalVmPythonExecutionEngine
public GraalVmPythonExecutionEngine()
-
-
Method Details
-
execute
Description copied from interface:CodeExecutionEngine
Execute the given code.- Specified by:
execute
in interfaceCodeExecutionEngine
- Parameters:
code
- The code to execute.- Returns:
- The result of the execution.
-