You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
WebRetriever doesn't work with GoogleAPI when I provide engine_id through search_engine_kwargs
Error message
...
TypeError: WebRetriever.__init__() got an unexpected keyword argument 'search_engine_kwargs'
Expected behavior
Error message says that WebRetriever has no init argument but it has.
To Reproduce
fromhaystack.nodesimportPromptNode, WebRetriever, PromptTemplatefromhaystack.pipelinesimportWebQAPipelineweb_prompt="""Synthesize a comprehensive answer from the following most relevant paragraphs and the given question.Provide a clear and concise answer, no longer than 10-20 words.\n\n Paragraphs: {documents} \n\n Question: {query} \n\n Answer:"""web_prompt_node=PromptNode(
"gpt-3.5-turbo", default_prompt_template=PromptTemplate(prompt=web_prompt), api_key=openai_api_key
)
web_retriever=WebRetriever(
api_key=search_api_key,
search_engine_provider="GoogleAPI",
search_engine_kwargs={"engine_id": engine_id}
)
pipeline=WebQAPipeline(retriever=web_retriever, prompt_node=web_prompt_node)
result=pipeline.run("Why was Jamie Foxx recently hospitalized?")
print(result)
Hi @anakin87, it seems like the main issue is solved with on the main branch, thank you for the information 🙌
However, the issue mentioned in #6003Exception: Exception while running node 'Shaper': 'score'
Enable debug logging to see the data that was passed when the pipeline failed persists. So, I'll close this one but add that info to #6003.
Describe the bug
WebRetriever doesn't work with GoogleAPI when I provide
engine_id
throughsearch_engine_kwargs
Error message
Expected behavior
Error message says that WebRetriever has no init argument but it has.
To Reproduce
or Colab nb to reproduce is here
FAQ Check
System:
The text was updated successfully, but these errors were encountered: