From 5b3a6f88fbc5e97a131929582c929cfb87446fe0 Mon Sep 17 00:00:00 2001 From: leonzh0u Date: Sun, 16 Jul 2023 23:12:26 -0400 Subject: [PATCH] remove actual keys from config file --- config/config.yaml | 4 ++-- examples/{serper_api.py => search_with_specific_engine.py} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename examples/{serper_api.py => search_with_specific_engine.py} (61%) diff --git a/config/config.yaml b/config/config.yaml index eef3ed26f..30168d81e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -4,7 +4,7 @@ #### if OpenAI -OPENAI_API_KEY: "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" +#OPENAI_API_KEY: "YOUR_API_KEY" #OPENAI_API_BASE: "YOUR_API_BASE" OPENAI_API_MODEL: "gpt-4" MAX_TOKENS: 1500 @@ -27,7 +27,7 @@ RPM: 10 ## Visit https://programmablesearchengine.google.com/controlpanel/create to get id. #GOOGLE_CSE_ID: "YOUR_CSE_ID" ## Visit https://serper.dev/ to get key. -# SERPER_API_KEY: "YOUR_API_KEY" +#SERPER_API_KEY: "YOUR_API_KEY" #### for TTS diff --git a/examples/serper_api.py b/examples/search_with_specific_engine.py similarity index 61% rename from examples/serper_api.py rename to examples/search_with_specific_engine.py index 264bd050b..46d604b95 100644 --- a/examples/serper_api.py +++ b/examples/search_with_specific_engine.py @@ -5,11 +5,11 @@ from metagpt.tools import SearchEngineType async def main(): # Serper API - await Searcher(engine = SearchEngineType.SERPER_GOOGLE).run("What are some good sun protection products?") + #await Searcher(engine = SearchEngineType.SERPER_GOOGLE).run("What are some good sun protection products?") # Serper API # await Searcher(engine = SearchEngineType.SERPAPI_GOOGLE).run("What are the best ski brands for skiers?") # Google API - # await Searcher(engine = SearchEngineType.DIRECT_GOOGLE).run("What are the most interesting human facts?") + await Searcher(engine = SearchEngineType.SERPAPI_GOOGLE).run("What are the most interesting human facts?") if __name__ == '__main__': asyncio.run(main())