Fetch chunk size and chunk overlap size from .env file

This commit is contained in:
yangdx
2025-01-26 02:31:16 +08:00
parent 22742ec9cb
commit e4e42a8ec4
2 changed files with 6 additions and 4 deletions

View File

@@ -44,6 +44,8 @@ MAX_TOKENS=32768
EMBEDDING_DIM=1024
MAX_EMBED_TOKENS=8192
#HISTORY_TURNS=3
#CHUNK_SIZE=1200
#CHUNK_OVERLAP_SIZE=100
# Security (empty for no key)
LIGHTRAG_API_KEY=your-secure-api-key-here

View File

@@ -383,14 +383,14 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--chunk_size",
default=1200,
help="chunk token size default 1200",
default=get_env_value("CHUNK_SIZE", 1200),
help="chunk chunk size default 1200",
)
parser.add_argument(
"--chunk_overlap_size",
default=100,
help="chunk token size default 1200",
default=get_env_value("CHUNK_OVERLAP_SIZE", 100),
help="chunk overlap size default 100",
)
def timeout_type(value):