Package dev.langchain4j.code.judge0
Class Judge0JavaScriptExecutionTool.Builder
java.lang.Object
dev.langchain4j.code.judge0.Judge0JavaScriptExecutionTool.Builder
- Enclosing class:
Judge0JavaScriptExecutionTool
Builder for creating a configured Judge0JavaScriptExecutionTool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the Rapid API key for Judge0.build()
Builds a new Judge0JavaScriptExecutionTool with the configured properties.fixCodeIfNeeded
(boolean fixCodeIfNeeded) Sets whether to fix code if needed.Sets the timeout for code execution.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Sets the Rapid API key for Judge0.- Parameters:
apiKey
- the API key- Returns:
- this builder
-
fixCodeIfNeeded
Sets whether to fix code if needed.- Parameters:
fixCodeIfNeeded
- whether to fix code- Returns:
- this builder
-
timeout
Sets the timeout for code execution.- Parameters:
timeout
- the timeout duration- Returns:
- this builder
-
build
Builds a new Judge0JavaScriptExecutionTool with the configured properties.- Returns:
- a new Judge0JavaScriptExecutionTool
- Throws:
IllegalArgumentException
- if apiKey is null, empty or blank
-