fix: light_server.py fix
This commit is contained in:
@@ -62,7 +62,7 @@ VECTOR_STORAGE = "NanoVectorDBStorage"
|
|||||||
|
|
||||||
# read config.ini
|
# read config.ini
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read("config.ini")
|
config.read("config.ini", "utf-8")
|
||||||
# Redis config
|
# Redis config
|
||||||
redis_uri = config.get("redis", "uri", fallback=None)
|
redis_uri = config.get("redis", "uri", fallback=None)
|
||||||
if redis_uri:
|
if redis_uri:
|
||||||
@@ -734,7 +734,8 @@ def create_app(args):
|
|||||||
azure_openai_embed,
|
azure_openai_embed,
|
||||||
)
|
)
|
||||||
if args.llm_binding_host == "openai-ollama" or args.embedding_binding == "ollama":
|
if args.llm_binding_host == "openai-ollama" or args.embedding_binding == "ollama":
|
||||||
from lightrag.llm.openai import openai_complete_if_cache, openai_embed
|
from lightrag.llm.openai import openai_complete_if_cache
|
||||||
|
from lightrag.llm.ollama import ollama_embed
|
||||||
|
|
||||||
async def openai_alike_model_complete(
|
async def openai_alike_model_complete(
|
||||||
prompt,
|
prompt,
|
||||||
|
@@ -499,11 +499,11 @@ class Neo4JStorage(BaseGraphStorage):
|
|||||||
|
|
||||||
# 方法2:兼容旧版本的查询方式
|
# 方法2:兼容旧版本的查询方式
|
||||||
query = """
|
query = """
|
||||||
MATCH (n)
|
MATCH (n)
|
||||||
WITH DISTINCT labels(n) AS node_labels
|
WITH DISTINCT labels(n) AS node_labels
|
||||||
UNWIND node_labels AS label
|
UNWIND node_labels AS label
|
||||||
RETURN DISTINCT label
|
RETURN DISTINCT label
|
||||||
ORDER BY label
|
ORDER BY label
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = await session.run(query)
|
result = await session.run(query)
|
||||||
|
Reference in New Issue
Block a user