This commit is contained in:
2025-08-28 07:32:04 +08:00
parent 67adcf5e79
commit 31ab2d4127
10 changed files with 76 additions and 9 deletions

View File

@@ -1,12 +1,8 @@
import logging
import os
import subprocess
import uuid
from PIL import Image
import os
from networkx.algorithms.bipartite.centrality import betweenness_centrality
# 或者如果你想更详细地控制日志输出
logger = logging.getLogger('DocxUtil')
@@ -143,3 +139,4 @@ def get_docx_content_by_pandoc(docx_file):
return content.replace("\n\n", "\n").replace("\\", "/")
else:
return None

View File

@@ -1,11 +1,12 @@
import logging
import logging.config
import os
import numpy as np
from lightrag import LightRAG
from lightrag.kg.shared_storage import initialize_pipeline_status
from lightrag.llm.openai import openai_complete_if_cache, openai_embed
from lightrag.rerank import jina_rerank, custom_rerank
from lightrag.rerank import custom_rerank
from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug
import Config.Config
@@ -144,8 +145,8 @@ def create_llm_model_func():
def create_embedding_func():
return EmbeddingFunc(
embedding_dim=1024,
max_token_size=8192,
embedding_dim=EMBED_DIM,
max_token_size=EMBED_MAX_TOKEN_SIZE,
func=lambda texts: openai_embed(
texts,
model=EMBED_MODEL_NAME,