mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Introduced beartype (#3460)
### What problem does this PR solve? Introduced [beartype](https://github.com/beartype/beartype) for runtime type-checking. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -18,7 +18,6 @@ import os
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import json
|
||||
from functools import reduce
|
||||
from typing import List
|
||||
import networkx as nx
|
||||
from api.db import LLMType
|
||||
from api.db.services.llm_service import LLMBundle
|
||||
@ -53,7 +52,7 @@ def graph_merge(g1, g2):
|
||||
return g
|
||||
|
||||
|
||||
def build_knowledge_graph_chunks(tenant_id: str, chunks: List[str], callback, entity_types=DEFAULT_ENTITY_TYPES):
|
||||
def build_knowledge_graph_chunks(tenant_id: str, chunks: list[str], callback, entity_types=DEFAULT_ENTITY_TYPES):
|
||||
_, tenant = TenantService.get_by_id(tenant_id)
|
||||
llm_bdl = LLMBundle(tenant_id, LLMType.CHAT, tenant.llm_id)
|
||||
ext = GraphExtractor(llm_bdl)
|
||||
|
||||
Reference in New Issue
Block a user