feat(ChatKnowledge): ChatKnowledge Support Keyword Retrieve (#1624)

Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
This commit is contained in:
Aries-ckt
2024-06-13 13:49:17 +08:00
committed by GitHub
parent 162e2c9b1c
commit 58d08780d6
86 changed files with 948 additions and 440 deletions

View File

@@ -1,7 +1,7 @@
"""Knowledge graph base class."""
import logging
from abc import ABC, abstractmethod
from typing import Optional
from typing import List, Optional
from dbgpt._private.pydantic import ConfigDict
from dbgpt.rag.index.base import IndexStoreBase, IndexStoreConfig
@@ -23,6 +23,6 @@ class KnowledgeGraphBase(IndexStoreBase, ABC):
def query_graph(self, limit: Optional[int] = None) -> Graph:
"""Get graph data."""
def delete_by_ids(self, ids: str):
def delete_by_ids(self, ids: str) -> List[str]:
"""Delete document by ids."""
raise Exception("Delete document not supported by knowledge graph")