This commit is contained in:
geekan 2023-12-21 22:24:26 +08:00
parent 73411d21eb
commit 139c7c363f
6 changed files with 10 additions and 8 deletions

View file

@ -5,12 +5,13 @@ from metagpt.tools import SearchEngineType
async def main():
question = "What are the most interesting human facts?"
# Serper API
# await Searcher(engine = SearchEngineType.SERPER_GOOGLE).run(["What are some good sun protection products?","What are some of the best beaches?"])
# await Searcher(engine=SearchEngineType.SERPER_GOOGLE).run(question)
# SerpAPI
# await Searcher(engine=SearchEngineType.SERPAPI_GOOGLE).run("What are the best ski brands for skiers?")
# await Searcher(engine=SearchEngineType.SERPAPI_GOOGLE).run(question)
# Google API
await Searcher(engine=SearchEngineType.DIRECT_GOOGLE).run("What are the most interesting human facts?")
await Searcher(engine=SearchEngineType.DIRECT_GOOGLE).run(question)
if __name__ == "__main__":