增加代码知识库;修复文档处理内容;增加API设置

This commit is contained in:
2026-05-16 20:20:10 +08:00
parent 69b49d28b2
commit 7aa3ce3294
119 changed files with 182273 additions and 793 deletions

View File

@@ -13,11 +13,11 @@ from app.services.llm.llm_factory import LLMFactory
class GraphRAGAdapter:
_instance_lock = asyncio.Lock()
def __init__(self):
def __init__(self, model_profile: Any = None):
self._graphrag_instances: Dict[int, Any] = {}
self._kb_locks: Dict[int, asyncio.Lock] = {}
self._embedding_model = EmbeddingsFactory.create()
self._llm_model = LLMFactory.create(streaming=False)
self._embedding_model = EmbeddingsFactory.create(model_profile=model_profile)
self._llm_model = LLMFactory.create(streaming=False, model_profile=model_profile)
self._symbols = self._load_symbols()
def _load_symbols(self) -> Dict[str, Any]: