-
Notifications
You must be signed in to change notification settings - Fork 2k
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
WebRetriver bug in Google API #6003
Comments
I think this should work. from haystack.nodes.search_engine.providers import GoogleAPI
# see https://github.com/deepset-ai/haystack/blob/main/haystack/nodes/search_engine/providers.py#L305
search_engine = GoogleAPI (api_key="my_key", top_k=5, engine_id="engineID")
web_retriever = WebRetriever(api_key="my_key", search_engine_provider=search_engine, top_k=3)
pn = PromptNode(
"gpt-3.5-turbo",
api_key="my_Key",
max_length=256,
default_prompt_template="question-answering-with-document-scores",
)
pipeline = WebQAPipeline(retriever=web_retriever, prompt_node=pn) |
Thank You so much @anakin87, Yes unfortunately it's not well documented. Your solution worked for me only if I set the the mode to "preprocessed_documents", but If I left it's default value "snippet" It throws this error that I also cannot find and ref for: |
My intuition is that the prompt template You can use a different prompt template. (@dfokina as you can understand from this issue, the example about GoogleAPI in our docs is wrong.) |
Honestly no! I tried a custom prompt template and it throws same error! It seams the issue from the WebQAPipeline itself. It somehow includes a default shaper. The question is, what is the key difference between WebRetriever and WebSearch classes? |
The main issue is solved on the main branch and will be released with Haystack 1.22.0 👍 However, I can reproduce the issue about Shaper on main: This is a problem when Here's the colab notebook to reproduce it: https://colab.research.google.com/drive/1otbIATmR_dh2RtTry7sYgF-JhasHS61B?usp=sharing |
Hello guys! I'm trying to run a WebRetriever RAG pipeline, but the webretriever with google doesn't work anyway!
Here's a code snippet I'm trying,
I got the error: TypeError: WebRetriever.init() got an unexpected keyword argument 'search_engine_kwargs'
When I remove this argument and try to run the pipeline, I get Exception: Exception while running node 'Retriever': You need to provide an engine ID for the Google API. See https://developers.google.com/custom-search/v1/overview
Enable debug logging to see the data that was passed when the pipeline failed.
I tried this snippet in both haystack versions, 1.18.1, and 1.21 and the same results showing.
Any help!
The text was updated successfully, but these errors were encountered: