mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-08 04:23:35 +00:00
chore: Add pylint for DB-GPT rag lib (#1267)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
"""Base Linker."""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List
|
||||
|
||||
@@ -6,7 +8,8 @@ class BaseSchemaLinker(ABC):
|
||||
"""Base Linker."""
|
||||
|
||||
def schema_linking(self, query: str) -> List:
|
||||
"""
|
||||
"""Query schema info.
|
||||
|
||||
Args:
|
||||
query (str): query text
|
||||
Returns:
|
||||
@@ -15,7 +18,8 @@ class BaseSchemaLinker(ABC):
|
||||
return self._schema_linking(query)
|
||||
|
||||
def schema_linking_with_vector_db(self, query: str) -> List:
|
||||
"""
|
||||
"""Query schema info with vector db.
|
||||
|
||||
Args:
|
||||
query (str): query text
|
||||
Returns:
|
||||
@@ -24,7 +28,8 @@ class BaseSchemaLinker(ABC):
|
||||
return self._schema_linking_with_vector_db(query)
|
||||
|
||||
async def schema_linking_with_llm(self, query: str) -> List:
|
||||
""" "
|
||||
"""Query schema info with llm.
|
||||
|
||||
Args:
|
||||
query(str): query text
|
||||
Returns:
|
||||
@@ -34,7 +39,8 @@ class BaseSchemaLinker(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def _schema_linking(self, query: str) -> List:
|
||||
"""
|
||||
"""Get DB schema info.
|
||||
|
||||
Args:
|
||||
query (str): query text
|
||||
Returns:
|
||||
@@ -43,7 +49,8 @@ class BaseSchemaLinker(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def _schema_linking_with_vector_db(self, query: str) -> List:
|
||||
"""
|
||||
"""Query schema info with vector db.
|
||||
|
||||
Args:
|
||||
query (str): query text
|
||||
Returns:
|
||||
@@ -52,7 +59,8 @@ class BaseSchemaLinker(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def _schema_linking_with_llm(self, query: str) -> List:
|
||||
"""
|
||||
"""Query schema info with llm.
|
||||
|
||||
Args:
|
||||
query (str): query text
|
||||
Returns:
|
||||
|
Reference in New Issue
Block a user