Add automatic comment handling in .env files

This commit is contained in:
yangdx
2025-02-22 13:25:12 +08:00
parent f9780830ad
commit e935fed50e
3 changed files with 13 additions and 1 deletions

View File

@@ -48,6 +48,10 @@ from .utils import (
set_logger,
)
from .types import KnowledgeGraph
from dotenv import load_dotenv
# Load environment variables
load_dotenv(override=True)
# TODO: TO REMOVE @Yannick
config = configparser.ConfigParser()

View File

@@ -5,6 +5,7 @@ import json
import re
from typing import Any, AsyncIterator
from collections import Counter, defaultdict
from .utils import (
logger,
clean_str,
@@ -34,6 +35,10 @@ from .base import (
)
from .prompt import GRAPH_FIELD_SEP, PROMPTS
import time
from dotenv import load_dotenv
# Load environment variables
load_dotenv(override=True)
def chunking_by_token_size(

View File

@@ -15,8 +15,11 @@ from typing import Any, Callable
import xml.etree.ElementTree as ET
import numpy as np
import tiktoken
from lightrag.prompt import PROMPTS
from dotenv import load_dotenv
# Load environment variables
load_dotenv(override=True)
VERBOSE_DEBUG = os.getenv("VERBOSE", "false").lower() == "true"