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

Add SearchApi integration #7936

Merged

Conversation

SebastjanPrachovskij
Copy link
Contributor

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.

@CLAassistant
Copy link

CLAassistant commented Jan 30, 2024

CLA assistant check
All committers have signed the CLA.

@@ -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):
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@w5688414 w5688414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Feb 28, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Feb 28, 2024
@sijunhe sijunhe merged commit 5bab940 into PaddlePaddle:develop Feb 28, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants