use KnowledgeGraph typed dict for graph API response

This commit is contained in:
ArnoChen
2025-02-13 17:32:51 +08:00
parent e4562c761c
commit c674905a98
5 changed files with 54 additions and 30 deletions

View File

@@ -13,6 +13,7 @@ from typing import (
import numpy as np
from .utils import EmbeddingFunc
from .types import KnowledgeGraph
class TextChunkSchema(TypedDict):
@@ -175,7 +176,7 @@ class BaseGraphStorage(StorageNameSpace):
async def get_knowledge_graph(
self, node_label: str, max_depth: int = 5
) -> dict[str, list[dict]]:
) -> KnowledgeGraph:
raise NotImplementedError