ParisNeo commited on
Commit
80a6755
·
unverified ·
1 Parent(s): 2dcd458

Update utils_api.py

Browse files
Files changed (1) hide show
  1. lightrag/api/utils_api.py +8 -0
lightrag/api/utils_api.py CHANGED
@@ -17,6 +17,10 @@ from starlette.status import HTTP_403_FORBIDDEN
17
  # Load environment variables
18
  load_dotenv(override=True)
19
 
 
 
 
 
20
 
21
  class OllamaServerInfos:
22
  # Constants for emulated Ollama model information
@@ -340,9 +344,13 @@ def parse_args(is_uvicorn_mode: bool = False) -> argparse.Namespace:
340
  # Inject chunk configuration
341
  args.chunk_size = get_env_value("CHUNK_SIZE", 1200, int)
342
  args.chunk_overlap_size = get_env_value("CHUNK_OVERLAP_SIZE", 100, int)
 
 
 
343
 
344
  ollama_server_infos.LIGHTRAG_MODEL = args.simulated_model_name
345
 
 
346
  return args
347
 
348
 
 
17
  # Load environment variables
18
  load_dotenv(override=True)
19
 
20
+ global_args={
21
+ "main_args":None
22
+ }
23
+
24
 
25
  class OllamaServerInfos:
26
  # Constants for emulated Ollama model information
 
344
  # Inject chunk configuration
345
  args.chunk_size = get_env_value("CHUNK_SIZE", 1200, int)
346
  args.chunk_overlap_size = get_env_value("CHUNK_OVERLAP_SIZE", 100, int)
347
+
348
+ # Select Document loading tool
349
+ args.document_loading_tool = get_env_value("DOCUMENT_LOADING_TOOL", "DOCLING")
350
 
351
  ollama_server_infos.LIGHTRAG_MODEL = args.simulated_model_name
352
 
353
+ global_args["main_args"]= args
354
  return args
355
 
356