zrguo
commited on
Commit
·
cdbc953
1
Parent(s):
ff6f836
fix logger level
Browse files- .gitignore +1 -0
- lightrag/api/lightrag_server.py +4 -1
- lightrag/operate.py +1 -1
.gitignore
CHANGED
@@ -31,6 +31,7 @@ log/
|
|
31 |
.pytest_cache/
|
32 |
.ruff_cache/
|
33 |
.gradio/
|
|
|
34 |
temp/
|
35 |
|
36 |
# IDE / Editor Files
|
|
|
31 |
.pytest_cache/
|
32 |
.ruff_cache/
|
33 |
.gradio/
|
34 |
+
.history/
|
35 |
temp/
|
36 |
|
37 |
# IDE / Editor Files
|
lightrag/api/lightrag_server.py
CHANGED
@@ -63,7 +63,10 @@ from ..kg.tidb_impl import (
|
|
63 |
)
|
64 |
|
65 |
# Load environment variables
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
# Initialize config parser
|
69 |
config = configparser.ConfigParser()
|
|
|
63 |
)
|
64 |
|
65 |
# Load environment variables
|
66 |
+
try:
|
67 |
+
load_dotenv(override=True)
|
68 |
+
except Exception as e:
|
69 |
+
logger.warning(f"Failed to load .env file: {e}")
|
70 |
|
71 |
# Initialize config parser
|
72 |
config = configparser.ConfigParser()
|
lightrag/operate.py
CHANGED
@@ -1662,7 +1662,7 @@ async def naive_query(
|
|
1662 |
return sys_prompt
|
1663 |
|
1664 |
len_of_prompts = len(encode_string_by_tiktoken(query + sys_prompt))
|
1665 |
-
logger.
|
1666 |
|
1667 |
response = await use_model_func(
|
1668 |
query,
|
|
|
1662 |
return sys_prompt
|
1663 |
|
1664 |
len_of_prompts = len(encode_string_by_tiktoken(query + sys_prompt))
|
1665 |
+
logger.debug(f"[naive_query]Prompt Tokens: {len_of_prompts}")
|
1666 |
|
1667 |
response = await use_model_func(
|
1668 |
query,
|