-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add SearchApi integration #7936
Add SearchApi integration #7936
Conversation
@@ -239,3 +239,110 @@ def search(self, query: str, **kwargs) -> List[Document]: | |||
logger.debug("Serper.dev API returned %s documents for the query '%s'", len(documents), query) | |||
result_docs = documents[:top_k] | |||
return self.score_results(result_docs, len(answer_box) > 0) | |||
|
|||
|
|||
class SearchApi(SearchEngine): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Add a unitest for your SearchApi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. Do you have any example test cases that use real HTTP requests? Otherwise, running the pipeline examples might be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
APIs
Description
Added SearchApi as a search engine provider. SearchApi provides engines such as Google, Google News, YouTube, and more.