🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
add default config.yaml
stellahsrf81f355ff243
diff --git a/.gitignore b/.gitignoreindex 5f8e400e3..9b679d48a 100644--- a/.gitignore+++ b/.gitignore@@ -164,5 +164,4 @@ tmpoutput.wavmetagpt/roles/idea_agent.py.aider*-/config/config.yaml/tests/metagpt/actions/check_data.pydiff --git a/config/config.yaml b/config/config.yamlnew file mode 100644index 000000000..bed67083c--- /dev/null+++ b/config/config.yaml@@ -0,0 +1,97 @@+# DO NOT MODIFY THIS FILE, create a new key.yaml, define OPENAI_API_KEY.+# The configuration of key.yaml has a higher priority and will not enter git++#### if OpenAI+## The official OPENAI_API_BASE is https://api.openai.com/v1+## If the official OPENAI_API_BASE is not available, we recommend using the [openai-forward](https://github.com/beidongjiedeguang/openai-forward).+## Or, you can configure OPENAI_PROXY to access official OPENAI_API_BASE.+OPENAI_API_BASE: "https://api.openai.com/v1"+#OPENAI_PROXY: "http://127.0.0.1:8118"+#OPENAI_API_KEY: "YOUR_API_KEY" # set the value to sk-xxx if you host the openai interface for open llm model+OPENAI_API_MODEL: "gpt-4"+MAX_TOKENS: 1500+RPM: 10++#### if Spark+#SPARK_APPID : "YOUR_APPID"+#SPARK_API_SECRET : "YOUR_APISecret"+#SPARK_API_KEY : "YOUR_APIKey"+#DOMAIN : "generalv2"+#SPARK_URL : "ws://spark-api.xf-yun.com/v2.1/chat"++#### if Anthropic+#Anthropic_API_KEY: "YOUR_API_KEY"++#### if AZURE, check https://github.com/openai/openai-cookbook/blob/main/examples/azure/chat.ipynb+#### You can use ENGINE or DEPLOYMENT mode+#OPENAI_API_TYPE: "azure"+#OPENAI_API_BASE: "YOUR_AZURE_ENDPOINT"+#OPENAI_API_KEY: "YOUR_AZURE_API_KEY"+#OPENAI_API_VERSION: "YOUR_AZURE_API_VERSION"+#DEPLOYMENT_NAME: "YOUR_DEPLOYMENT_NAME"+#DEPLOYMENT_ID: "YOUR_DEPLOYMENT_ID"++#### if zhipuai from `https://open.bigmodel.cn`. You can set here or export API_KEY="YOUR_API_KEY"+# ZHIPUAI_API_KEY: "YOUR_API_KEY"++#### for Search++## Supported values: serpapi/google/serper/ddg+#SEARCH_ENGINE: serpapi++## Visit https://serpapi.com/ to get key.+#SERPAPI_API_KEY: "YOUR_API_KEY"++## Visit https://console.cloud.google.com/apis/credentials to get key.+#GOOGLE_API_KEY: "YOUR_API_KEY"+## 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"++#### for web access++## Supported values: playwright/selenium+#WEB_BROWSER_ENGINE: playwright++## Supported values: chromium/firefox/webkit, visit https://playwright.dev/python/docs/api/class-browsertype+##PLAYWRIGHT_BROWSER_TYPE: chromium++## Supported values: chrome/firefox/edge/ie, visit https://www.selenium.dev/documentation/webdriver/browsers/+# SELENIUM_BROWSER_TYPE: chrome++#### for TTS++#AZURE_TTS_SUBSCRIPTION_KEY: "YOUR_API_KEY"+#AZURE_TTS_REGION: "eastus"++#### for Stable Diffusion+## Use SD service, based on https://github.com/AUTOMATIC1111/stable-diffusion-webui+SD_URL: "YOUR_SD_URL"+SD_T2I_API: "/sdapi/v1/txt2img"++#### for Execution+#LONG_TERM_MEMORY: false++#### for Mermaid CLI+## If you installed mmdc (Mermaid CLI) only for metagpt then enable the following configuration.+#PUPPETEER_CONFIG: "./config/puppeteer-config.json"+#MMDC: "./node_modules/.bin/mmdc"+++### for calc_usage+# CALC_USAGE: false++### for Research+MODEL_FOR_RESEARCHER_SUMMARY: gpt-3.5-turbo+MODEL_FOR_RESEARCHER_REPORT: gpt-3.5-turbo-16k++### choose the engine for mermaid conversion,+# default is nodejs, you can change it to playwright,pyppeteer or ink+# MERMAID_ENGINE: nodejs++### browser path for pyppeteer engine, support Chrome, Chromium,MS Edge+#PYPPETEER_EXECUTABLE_PATH: "/usr/bin/google-chrome-stable"++PROMPT_FORMAT: json #json or markdown\ No newline at end of filediff --git a/metagpt/roles/ml_engineer.py b/metagpt/roles/ml_engineer.pyindex 8b7b72517..c3f1bd669 100644--- a/metagpt/roles/ml_engineer.py+++ b/metagpt/roles/ml_engineer.py@@ -217,11 +217,11 @@ class MLEngineer(Role):if __name__ == "__main__":- # requirement = "Run data analysis on sklearn Iris dataset, include a plot"+ requirement = "Run data analysis on sklearn Iris dataset, include a plot"# requirement = "Run data analysis on sklearn Diabetes dataset, include a plot"# requirement = "Run data analysis on sklearn Wine recognition dataset, include a plot, and train a model to predict wine class (20% as validation), and show validation accuracy"# requirement = "Run data analysis on sklearn Wisconsin Breast Cancer dataset, include a plot, train a model to predict targets (20% as validation), and show validation accuracy"- requirement = "Run EDA and visualization on this dataset, train a model to predict survival, report metrics on validation set (20%), dataset: workspace/titanic/train.csv"+ # requirement = "Run EDA and visualization on this dataset, train a model to predict survival, report metrics on validation set (20%), dataset: workspace/titanic/train.csv"async def main(requirement: str = requirement, auto_run: bool = True):role = MLEngineer(goal=requirement, auto_run=auto_run)