mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
Merge pull request #286 from seehi/feature-faiss-search-kwargs
pass kwargs in faiss search
This commit is contained in:
commit
c10feec2f6
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ class FaissStore(LocalStore):
|
|||
store.index = index
|
||||
|
||||
def search(self, query, expand_cols=False, sep='\n', *args, k=5, **kwargs):
|
||||
rsp = self.store.similarity_search(query, k=k)
|
||||
rsp = self.store.similarity_search(query, k=k, **kwargs)
|
||||
logger.debug(rsp)
|
||||
if expand_cols:
|
||||
return str(sep.join([f"{x.page_content}: {x.metadata}" for x in rsp]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue