Files
DB-GPT/dbgpt/agent/resource/resource_knowledge_api.py
明天 d5afa6e206 Native data AI application framework based on AWEL+AGENT (#1152)
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>
2024-02-07 17:43:27 +08:00

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.")