mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
feat: env MAX_TOOLS_NUM (#15431)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
@@ -40,3 +40,6 @@ NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
|
||||
|
||||
# Maximum loop count in the workflow
|
||||
NEXT_PUBLIC_LOOP_NODE_MAX_COUNT=100
|
||||
|
||||
# Maximum number of tools in the agent/workflow
|
||||
NEXT_PUBLIC_MAX_TOOLS_NUM=10
|
||||
@@ -47,6 +47,7 @@ const LocaleLayout = ({
|
||||
data-public-maintenance-notice={process.env.NEXT_PUBLIC_MAINTENANCE_NOTICE}
|
||||
data-public-site-about={process.env.NEXT_PUBLIC_SITE_ABOUT}
|
||||
data-public-text-generation-timeout-ms={process.env.NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS}
|
||||
data-public-max-tools-num={process.env.NEXT_PUBLIC_MAX_TOOLS_NUM}
|
||||
data-public-top-k-max-value={process.env.NEXT_PUBLIC_TOP_K_MAX_VALUE}
|
||||
data-public-indexing-max-segmentation-tokens-length={process.env.NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH}
|
||||
data-public-loop-node-max-count={process.env.NEXT_PUBLIC_LOOP_NODE_MAX_COUNT}
|
||||
|
||||
@@ -162,7 +162,14 @@ export const ANNOTATION_DEFAULT = {
|
||||
score_threshold: 0.9,
|
||||
}
|
||||
|
||||
export const MAX_TOOLS_NUM = 10
|
||||
export let maxToolsNum = 10
|
||||
|
||||
if (process.env.NEXT_PUBLIC_MAX_TOOLS_NUM && process.env.NEXT_PUBLIC_MAX_TOOLS_NUM !== '')
|
||||
maxToolsNum = Number.parseInt(process.env.NEXT_PUBLIC_MAX_TOOLS_NUM)
|
||||
else if (globalThis.document?.body?.getAttribute('data-public-max-tools-num') && globalThis.document.body.getAttribute('data-public-max-tools-num') !== '')
|
||||
maxToolsNum = Number.parseInt(globalThis.document.body.getAttribute('data-public-max-tools-num') as string)
|
||||
|
||||
export const MAX_TOOLS_NUM = maxToolsNum
|
||||
|
||||
export const DEFAULT_AGENT_SETTING = {
|
||||
enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user