From e29682eef86580589a2697eb9648846ee68454e6 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 29 Jan 2025 23:39:47 +0800 Subject: [PATCH] Allow configuration of LLM parameters through environment variables --- lightrag/lightrag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index acad9295..92fc954f 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -158,8 +158,8 @@ class LightRAG: # LLM llm_model_func: callable = None # This must be set (we do want to separate llm from the corte, so no more default initialization) llm_model_name: str = "meta-llama/Llama-3.2-1B-Instruct" # 'meta-llama/Llama-3.2-1B'#'google/gemma-2-2b-it' - llm_model_max_token_size: int = 32768 - llm_model_max_async: int = 16 + llm_model_max_token_size: int = int(os.getenv("MAX_TOKENS", "32768")) + llm_model_max_async: int = int(os.getenv("MAX_ASYNC", "16")) llm_model_kwargs: dict = field(default_factory=dict) # storage