Skip to content

Commit 368b57a

Browse files
Zhe YuDavidyz
authored andcommitted
WIP(cli): Add wip chromadb connector
1 parent a84c737 commit 368b57a

3 files changed

Lines changed: 432 additions & 3 deletions

File tree

src/vectorcode/database/base.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from abc import ABC, abstractmethod
33
from typing import Optional, Sequence
44

5+
from numpy.typing import NDArray
6+
57
from vectorcode.chunking import Chunk
68
from vectorcode.cli_utils import Config
79
from vectorcode.database.types import (
@@ -48,13 +50,20 @@ async def count(
4850

4951
@abstractmethod
5052
async def query(
51-
self, collection_id: CollectionID, keywords: list[str], opts: QueryOpts
53+
self,
54+
collection_id: CollectionID,
55+
keywords_embeddings: list[NDArray],
56+
opts: QueryOpts,
5257
) -> Sequence[QueryResult]:
5358
pass
5459

5560
@abstractmethod
5661
async def vectorise(
57-
self, collection_id: CollectionID, chunks: Sequence[Chunk]
62+
self,
63+
collection_id: CollectionID,
64+
chunks: Sequence[Chunk],
65+
chunk_embeddings: Sequence[NDArray],
66+
file_hashes: Sequence[str],
5867
) -> VectoriseStats:
5968
pass
6069

0 commit comments

Comments
 (0)