core: add kwargs support to VectorStore (#25934)

has been missing the passthrough until now

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Harrison Chase
2024-12-16 10:57:57 -08:00
committed by GitHub
parent 87c50f99e5
commit de7996c2ca
5 changed files with 50 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
Unit tests for the PebbloRetrievalQA chain
"""
from typing import List
from typing import Any, List
from unittest.mock import Mock
import pytest
@@ -35,12 +35,16 @@ class FakeRetriever(VectorStoreRetriever):
vectorstore: VectorStore = Mock()
def _get_relevant_documents(
self, query: str, *, run_manager: CallbackManagerForRetrieverRun
self, query: str, *, run_manager: CallbackManagerForRetrieverRun, **kwargs: Any
) -> List[Document]:
return [Document(page_content=query)]
async def _aget_relevant_documents(
self, query: str, *, run_manager: AsyncCallbackManagerForRetrieverRun
self,
query: str,
*,
run_manager: AsyncCallbackManagerForRetrieverRun,
**kwargs: Any,
) -> List[Document]:
return [Document(page_content=query)]