mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-28 04:31:59 +00:00
Feature: Configuring search modes for RAG - Address review
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
This commit is contained in:
parent
2060fdba7f
commit
6a2a0836c5
11 changed files with 11 additions and 13 deletions
|
|
@ -118,7 +118,7 @@ class FaissIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -203,8 +203,6 @@ class SQLiteVecIndex(EmbeddingIndex):
|
|||
"""
|
||||
Performs vector-based search using a virtual table for vector similarity.
|
||||
"""
|
||||
if embedding is None:
|
||||
raise ValueError("embedding is required for vector search.")
|
||||
|
||||
def _execute_query():
|
||||
connection = _create_sqlite_connection(self.db_path)
|
||||
|
|
@ -243,7 +241,7 @@ class SQLiteVecIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class ChromaIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class MilvusIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class PGVectorIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class QdrantIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class WeaviateIndex(EmbeddingIndex):
|
|||
|
||||
async def query_keyword(
|
||||
self,
|
||||
query_string: str | None,
|
||||
query_string: str,
|
||||
k: int,
|
||||
score_threshold: float,
|
||||
) -> QueryChunksResponse:
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class EmbeddingIndex(ABC):
|
|||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
async def query_keyword(self, query_string: str | None, k: int, score_threshold: float) -> QueryChunksResponse:
|
||||
async def query_keyword(self, query_string: str, k: int, score_threshold: float) -> QueryChunksResponse:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue