diff --git a/.env.example b/.env.example index b652847b..82b9ca70 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index e000dc0e..da15d212 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -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):