Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
get config default for sandbox (#3508)
miendinhb9fbc3975445
diff --git a/api/config.py b/api/config.pyindex 89ebc879b11..dfe3f5ae635 100644--- a/api/config.py+++ b/api/config.py@@ -64,8 +64,8 @@ DEFAULTS = {'ETL_TYPE': 'dify','KEYWORD_STORE': 'jieba','BATCH_UPLOAD_LIMIT': 20,- 'CODE_EXECUTION_ENDPOINT': '',- 'CODE_EXECUTION_API_KEY': '',+ 'CODE_EXECUTION_ENDPOINT': 'http://sandbox:8194',+ 'CODE_EXECUTION_API_KEY': 'dify-sandbox','TOOL_ICON_CACHE_MAX_AGE': 3600,'MILVUS_DATABASE': 'default','KEYWORD_DATA_SOURCE_TYPE': 'database',diff --git a/api/core/helper/code_executor/code_executor.py b/api/core/helper/code_executor/code_executor.pyindex 9a9bc1a75c4..3221bbe59e9 100644--- a/api/core/helper/code_executor/code_executor.py+++ b/api/core/helper/code_executor/code_executor.py@@ -1,17 +1,17 @@-from os import environfrom typing import Literal, Optionalfrom httpx import postfrom pydantic import BaseModelfrom yarl import URL+from config import get_envfrom core.helper.code_executor.javascript_transformer import NodeJsTemplateTransformerfrom core.helper.code_executor.jina2_transformer import Jinja2TemplateTransformerfrom core.helper.code_executor.python_transformer import PythonTemplateTransformer# Code Executor-CODE_EXECUTION_ENDPOINT = environ.get('CODE_EXECUTION_ENDPOINT', '')-CODE_EXECUTION_API_KEY = environ.get('CODE_EXECUTION_API_KEY', '')+CODE_EXECUTION_ENDPOINT = get_env('CODE_EXECUTION_ENDPOINT')+CODE_EXECUTION_API_KEY = get_env('CODE_EXECUTION_API_KEY')CODE_EXECUTION_TIMEOUT= (10, 60)@@ -27,6 +27,7 @@ class CodeExecutionResponse(BaseModel):message: strdata: Data+class CodeExecutor:@classmethoddef execute_code(cls, language: Literal['python3', 'javascript', 'jinja2'], code: str, inputs: dict) -> dict: