Update utils_api.py
This commit is contained in:
@@ -17,6 +17,10 @@ from starlette.status import HTTP_403_FORBIDDEN
|
|||||||
# Load environment variables
|
# Load environment variables
|
||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
|
|
||||||
|
global_args={
|
||||||
|
"main_args":None
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class OllamaServerInfos:
|
class OllamaServerInfos:
|
||||||
# Constants for emulated Ollama model information
|
# Constants for emulated Ollama model information
|
||||||
@@ -341,8 +345,12 @@ def parse_args(is_uvicorn_mode: bool = False) -> argparse.Namespace:
|
|||||||
args.chunk_size = get_env_value("CHUNK_SIZE", 1200, int)
|
args.chunk_size = get_env_value("CHUNK_SIZE", 1200, int)
|
||||||
args.chunk_overlap_size = get_env_value("CHUNK_OVERLAP_SIZE", 100, int)
|
args.chunk_overlap_size = get_env_value("CHUNK_OVERLAP_SIZE", 100, int)
|
||||||
|
|
||||||
|
# Select Document loading tool
|
||||||
|
args.document_loading_tool = get_env_value("DOCUMENT_LOADING_TOOL", "DOCLING")
|
||||||
|
|
||||||
ollama_server_infos.LIGHTRAG_MODEL = args.simulated_model_name
|
ollama_server_infos.LIGHTRAG_MODEL = args.simulated_model_name
|
||||||
|
|
||||||
|
global_args["main_args"]= args
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user