objected knowledge base implement for email code structure

This commit is contained in:
tsukasa
2023-08-30 17:16:37 +08:00
parent 8ba9f7c196
commit a7960861d1
10 changed files with 180 additions and 13 deletions
+14
View File
@@ -0,0 +1,14 @@
# import the ObjectID class
from .object import ObjectID
# define a vector base class
class VectorBase:
def __init__(self, db_url, model_name) -> None:
self.db_url = db_url
self.model_name = model_name
async def insert(self, vector: [float], id: ObjectID):
pass
async def query(self, vector: [float], top_k: int) -> [ObjectID]:
pass