yangdx
commited on
Commit
·
83d1fd5
1
Parent(s):
730231e
Fetch chunk size and chunk overlap size from .env file
Browse files- .env.example +2 -0
- lightrag/api/lightrag_server.py +4 -4
.env.example
CHANGED
@@ -44,6 +44,8 @@ MAX_TOKENS=32768
|
|
44 |
EMBEDDING_DIM=1024
|
45 |
MAX_EMBED_TOKENS=8192
|
46 |
#HISTORY_TURNS=3
|
|
|
|
|
47 |
|
48 |
# Security (empty for no key)
|
49 |
LIGHTRAG_API_KEY=your-secure-api-key-here
|
|
|
44 |
EMBEDDING_DIM=1024
|
45 |
MAX_EMBED_TOKENS=8192
|
46 |
#HISTORY_TURNS=3
|
47 |
+
#CHUNK_SIZE=1200
|
48 |
+
#CHUNK_OVERLAP_SIZE=100
|
49 |
|
50 |
# Security (empty for no key)
|
51 |
LIGHTRAG_API_KEY=your-secure-api-key-here
|
lightrag/api/lightrag_server.py
CHANGED
@@ -383,14 +383,14 @@ def parse_args() -> argparse.Namespace:
|
|
383 |
|
384 |
parser.add_argument(
|
385 |
"--chunk_size",
|
386 |
-
default=1200,
|
387 |
-
help="chunk
|
388 |
)
|
389 |
|
390 |
parser.add_argument(
|
391 |
"--chunk_overlap_size",
|
392 |
-
default=100,
|
393 |
-
help="chunk
|
394 |
)
|
395 |
|
396 |
def timeout_type(value):
|
|
|
383 |
|
384 |
parser.add_argument(
|
385 |
"--chunk_size",
|
386 |
+
default=get_env_value("CHUNK_SIZE", 1200),
|
387 |
+
help="chunk chunk size default 1200",
|
388 |
)
|
389 |
|
390 |
parser.add_argument(
|
391 |
"--chunk_overlap_size",
|
392 |
+
default=get_env_value("CHUNK_OVERLAP_SIZE", 100),
|
393 |
+
help="chunk overlap size default 100",
|
394 |
)
|
395 |
|
396 |
def timeout_type(value):
|