diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..623e6e556 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +|---------|--------------------| + | 7.x | :x: | + | 6.x | :x: | +| < 6.x | :x: | + + +## Reporting a Vulnerability + +If you have any vulnerability reports, please contact alexanderwu@deepwisdom.ai . \ No newline at end of file diff --git a/config/config2.example.yaml b/config/config2.example.yaml index a17d174b3..3a5cc3585 100644 --- a/config/config2.example.yaml +++ b/config/config2.example.yaml @@ -3,7 +3,6 @@ llm: base_url: "YOUR_BASE_URL" api_key: "YOUR_API_KEY" model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview - repair_llm_output: true # when the output is not a valid json, try to repair it proxy: "YOUR_PROXY" # for LLM API requests pricing_plan: "" # Optional. If invalid, it will be automatically filled in with the value of the `model`. # Azure-exclusive pricing plan mappings: @@ -13,6 +12,8 @@ llm: # - gpt-4 8k: "gpt-4" # See for more: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/ +repair_llm_output: true # when the output is not a valid json, try to repair it + proxy: "YOUR_PROXY" # for tools like requests, playwright, selenium, etc. search: diff --git a/examples/debate.py b/examples/debate.py index 72ab8796d..56df16b4f 100644 --- a/examples/debate.py +++ b/examples/debate.py @@ -5,6 +5,7 @@ Author: garylin2099 @Modified By: mashenquan, 2023-11-1. In accordance with Chapter 2.1.3 of RFC 116, modify the data type of the `send_to` value of the `Message` object; modify the argument type of `get_by_actions`. """ + import asyncio import platform from typing import Any @@ -105,4 +106,4 @@ def main(idea: str, investment: float = 3.0, n_round: int = 10): if __name__ == "__main__": - fire.Fire(main) + fire.Fire(main) # run as python debate.py --idea="TOPIC" --investment=3.0 --n_round=5 diff --git a/examples/search_with_specific_engine.py b/examples/search_with_specific_engine.py index 97b1378ee..1eee762d5 100644 --- a/examples/search_with_specific_engine.py +++ b/examples/search_with_specific_engine.py @@ -4,21 +4,17 @@ """ import asyncio +from metagpt.config2 import Config from metagpt.roles import Searcher -from metagpt.tools.search_engine import SearchEngine, SearchEngineType +from metagpt.tools.search_engine import SearchEngine async def main(): question = "What are the most interesting human facts?" - kwargs = {"api_key": "", "cse_id": "", "proxy": None} - # Serper API - # await Searcher(search_engine=SearchEngine(engine=SearchEngineType.SERPER_GOOGLE, **kwargs)).run(question) - # SerpAPI - # await Searcher(search_engine=SearchEngine(engine=SearchEngineType.SERPAPI_GOOGLE, **kwargs)).run(question) - # Google API - # await Searcher(search_engine=SearchEngine(engine=SearchEngineType.DIRECT_GOOGLE, **kwargs)).run(question) - # DDG API - await Searcher(search_engine=SearchEngine(engine=SearchEngineType.DUCK_DUCK_GO, **kwargs)).run(question) + + search = Config.default().search + kwargs = {"api_key": search.api_key, "cse_id": search.cse_id, "proxy": None} + await Searcher(search_engine=SearchEngine(engine=search.api_type, **kwargs)).run(question) if __name__ == "__main__":