mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-08 16:10:18 +08:00
commit
11856cc542
@ -46,7 +46,7 @@ class PGKBService(KBService):
|
|||||||
def do_search(self, query: str, top_k: int, score_threshold: float, embeddings: Embeddings) -> List[Document]:
|
def do_search(self, query: str, top_k: int, score_threshold: float, embeddings: Embeddings) -> List[Document]:
|
||||||
# todo: support score threshold
|
# todo: support score threshold
|
||||||
self._load_pg_vector(embeddings=embeddings)
|
self._load_pg_vector(embeddings=embeddings)
|
||||||
return self.pg_vector.similarity_search(query, top_k)
|
return self.pg_vector.similarity_search_with_score(query, top_k)
|
||||||
|
|
||||||
def add_doc(self, kb_file: KnowledgeFile):
|
def add_doc(self, kb_file: KnowledgeFile):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user