mirror of
https://github.com/langgenius/dify.git
synced 2026-06-26 14:51:13 +08:00
fix feedback
This commit is contained in:
parent
067d1d1578
commit
da15884ce2
@ -530,7 +530,7 @@ LOG_FORMAT=%(asctime)s,%(msecs)d %(levelname)-2s [%(filename)s:%(lineno)d] %(req
|
||||
|
||||
# Indexing configuration
|
||||
INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
|
||||
# Maximum number of worker threads used for high-quality dataset indexing.
|
||||
# Maximum number of worker threads used for high-quality dataset indexing (1-10).
|
||||
# Lower this value to reduce memory usage and avoid OOM freezes during re-indexing.
|
||||
INDEXING_MAX_WORKERS=2
|
||||
|
||||
|
||||
@ -1109,7 +1109,7 @@ class IndexingConfig(BaseSettings):
|
||||
)
|
||||
|
||||
INDEXING_MAX_WORKERS: PositiveInt = Field(
|
||||
description="Maximum number of worker threads used for high-quality dataset indexing",
|
||||
description="Maximum number of worker threads used for high-quality dataset indexing (1-10)",
|
||||
default=2,
|
||||
)
|
||||
|
||||
|
||||
@ -604,7 +604,7 @@ class IndexingRunner:
|
||||
|
||||
# High-quality indexing is memory intensive (embedding generation + vector writes).
|
||||
# Running too many chunks in parallel can trigger OOM and freeze the service until reboot.
|
||||
max_workers = max(1, min(10, int(dify_config.INDEXING_MAX_WORKERS)))
|
||||
max_workers = max(1, int(dify_config.INDEXING_MAX_WORKERS))
|
||||
max_workers = min(max_workers, len(documents)) if documents else 1
|
||||
if dataset.indexing_technique == IndexTechniqueType.HIGH_QUALITY:
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
|
||||
|
||||
@ -1009,7 +1009,7 @@ SENDGRID_API_KEY=
|
||||
# Maximum length of segmentation tokens for indexing
|
||||
INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
|
||||
|
||||
# Maximum number of worker threads used for high-quality dataset indexing.
|
||||
# Maximum number of worker threads used for high-quality dataset indexing (1-10).
|
||||
# Lower this value to reduce memory usage and avoid OOM/freezes during re-indexing.
|
||||
INDEXING_MAX_WORKERS=2
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user