From b6b7272cdc57baf7a205eeff8779a4463573bad7 Mon Sep 17 00:00:00 2001 From: ryanwclark1 <36689148+ryanwclark1@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:52:48 -0500 Subject: [PATCH] Add default model option to setup-config reads echo and writes to conf if not provided by user (#585) Co-authored-by: Ryan Clark --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ffc05d8180..bdabc7f82d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ DOCKER_IMAGE = ghcr.io/opendevin/sandbox BACKEND_PORT = 3000 FRONTEND_PORT = 3001 DEFAULT_WORKSPACE_DIR = "./workspace" +DEFAULT_MODEL = "gpt-4-0125-preview" CONFIG_FILE = config.toml # Build @@ -42,7 +43,8 @@ setup-config: @echo "Setting up config.toml..." @read -p "Enter your LLM API key: " llm_api_key; \ echo "LLM_API_KEY=\"$$llm_api_key\"" >> $(CONFIG_FILE).tmp - @read -p "Enter your LLM Model name [default: gpt-4-0125-preview]: " llm_model; \ + @read -p "Enter your LLM Model name [default: $(DEFAULT_MODEL)]: " llm_model; \ + llm_model=$${llm_model:-$(DEFAULT_MODEL)}; \ echo "LLM_MODEL=\"$$llm_model\"" >> $(CONFIG_FILE).tmp @read -p "Enter your workspace directory [default: $(DEFAULT_WORKSPACE_DIR)]: " workspace_dir; \ workspace_dir=$${workspace_dir:-$(DEFAULT_WORKSPACE_DIR)}; \