Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VertexAISearchRetriever does not support "search_kwargs" #379

Open
Freezaa9 opened this issue Jul 18, 2024 · 1 comment
Open

VertexAISearchRetriever does not support "search_kwargs" #379

Freezaa9 opened this issue Jul 18, 2024 · 1 comment

Comments

@Freezaa9
Copy link
Contributor

Freezaa9 commented Jul 18, 2024

Hi,

GoogleVertexAISearchRetriever does not support "search_kwargs".
Would be nice to support search_kwargs to be able to create code when you can easily switch vector store.
Usually in vector store in langchain you don't specify the number of document to retrieve when creating the retriever but afterward by setting "k"

retriever = VertexAISearchRetriever(    
project_id=PROJECT_ID,
    location_id=LOCATION_ID,

    data_store_id=DATA_STORE_ID,
    max_documents=10,
    engine_data_type=1,
)
retriever.search_kwargs = {"k": 5}
relevant_documents = retriever.invoke(query)

ValueError: "VertexAISearchRetriever" object has no field "search_kwargs"

Thanks !

@Freezaa9 Freezaa9 changed the title GoogleVertexAISearchRetriever does not support "search_kwargs" Google VertexAISearchRetriever does not support "search_kwargs" Jul 24, 2024
@Freezaa9 Freezaa9 changed the title Google VertexAISearchRetriever does not support "search_kwargs" VertexAISearchRetriever does not support "search_kwargs" Jul 24, 2024
@lkuligin
Copy link
Collaborator

Would you be open to send a PR that fixes this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants