fix: webui fix

This commit is contained in:
hyb
2025-01-25 18:54:40 +08:00
parent 3dba406644
commit 8e52846a8b
4 changed files with 19 additions and 1 deletions

View File

View File

View File

@@ -1,5 +1,15 @@
from dataclasses import dataclass, field
from typing import TypedDict, Union, Literal, Generic, TypeVar, Optional, Dict, Any
from typing import (
TypedDict,
Union,
Literal,
Generic,
TypeVar,
Optional,
Dict,
Any,
List,
)
from enum import Enum
import numpy as np
@@ -140,6 +150,14 @@ class BaseGraphStorage(StorageNameSpace):
async def embed_nodes(self, algorithm: str) -> tuple[np.ndarray, list[str]]:
raise NotImplementedError("Node embedding is not used in lightrag.")
async def get_all_labels(self) -> List[str]:
raise NotImplementedError
async def get_knowledge_graph(
self, node_label: str, max_depth: int = 5
) -> Dict[str, List[Dict]]:
raise NotImplementedError
class DocStatus(str, Enum):
"""Document processing status enum"""