Add Scavio integration#531
Conversation
|
@scavio-ai is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @bogdankostic, following up on deepset-ai/haystack-core-integrations#3486 — we published the integration ourselves per your suggestion.
This PR just adds the listing ( |
bilgeyucel
left a comment
There was a problem hiding this comment.
Thanks for the PR! Left a comment
| #### In a Pipeline | ||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.components.builders import PromptBuilder | ||
| from haystack.components.generators import OpenAIGenerator | ||
| from haystack_integrations.components.websearch.scavio import ScavioWebSearch | ||
|
|
||
| template = """ | ||
| Given the following web search results, answer the question. | ||
|
|
||
| Results: | ||
| {% for doc in documents %}{{ doc.content }} | ||
| {% endfor %} | ||
|
|
||
| Question: {{ query }} | ||
| Answer: | ||
| """ | ||
|
|
||
| pipe = Pipeline() | ||
| pipe.add_component("search", ScavioWebSearch(top_k=5)) | ||
| pipe.add_component("prompt_builder", PromptBuilder(template=template)) | ||
| pipe.add_component("llm", OpenAIGenerator()) | ||
| pipe.connect("search.documents", "prompt_builder.documents") | ||
| pipe.connect("prompt_builder", "llm") | ||
|
|
||
| query = "What is Haystack by deepset?" | ||
| result = pipe.run(data={"search": {"query": query}, "prompt_builder": {"query": query}}) | ||
| print(result["llm"]["replies"][0]) | ||
| ``` |
There was a problem hiding this comment.
We dont need this section as the first part clearly shows how to use the component
| #### In a Pipeline | |
| ```python | |
| from haystack import Pipeline | |
| from haystack.components.builders import PromptBuilder | |
| from haystack.components.generators import OpenAIGenerator | |
| from haystack_integrations.components.websearch.scavio import ScavioWebSearch | |
| template = """ | |
| Given the following web search results, answer the question. | |
| Results: | |
| {% for doc in documents %}{{ doc.content }} | |
| {% endfor %} | |
| Question: {{ query }} | |
| Answer: | |
| """ | |
| pipe = Pipeline() | |
| pipe.add_component("search", ScavioWebSearch(top_k=5)) | |
| pipe.add_component("prompt_builder", PromptBuilder(template=template)) | |
| pipe.add_component("llm", OpenAIGenerator()) | |
| pipe.connect("search.documents", "prompt_builder.documents") | |
| pipe.connect("prompt_builder", "llm") | |
| query = "What is Haystack by deepset?" | |
| result = pipe.run(data={"search": {"query": query}, "prompt_builder": {"query": query}}) | |
| print(result["llm"]["replies"][0]) | |
| ``` |
There was a problem hiding this comment.
Good call — removed the "In a Pipeline" section. Thanks for the review!
Adds a listing for the Scavio integration, following up on deepset-ai/haystack-core-integrations#3486 (we published the component as a standalone package per the maintainer's recommendation).
ScavioWebSearch— web search returning HaystackDocuments and source links, mirroringTavilyWebSearch/ExaWebSearch.pip install scavio-haystack)Adds
integrations/scavio.mdandlogos/scavio.png.