mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-22 17:39:02 +00:00
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: lcx01800250 <lcx01800250@alibaba-inc.com> Co-authored-by: licunxing <864255598@qq.com> Co-authored-by: Aralhi <xiaoping0501@gmail.com> Co-authored-by: xuyuan23 <643854343@qq.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: hzh97 <2976151305@qq.com>
20 lines
662 B
Python
20 lines
662 B
Python
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
|
|
from dbgpt.rag.retriever.base import BaseRetriever
|
|
|
|
from .resource_api import ResourceClient, ResourceType
|
|
|
|
|
|
class ResourceKnowledgeClient(ResourceClient):
|
|
@property
|
|
def type(self):
|
|
return ResourceType.Knowledge
|
|
|
|
async def a_get_kn(self, space_name: str, question: Optional[str] = None) -> str:
|
|
raise NotImplementedError("The run method should be implemented in a subclass.")
|
|
|
|
async def add_kn(
|
|
self, space_name: str, kn_name: str, type: str, content: Optional[Any]
|
|
):
|
|
raise NotImplementedError("The run method should be implemented in a subclass.")
|