Răsfoiți Sursa

Add default model option to setup-config reads echo and writes to conf if not provided by user (#585)

Co-authored-by: Ryan Clark <ryanc@accentservices.com>
ryanwclark1 1 an în urmă
părinte
comite
b6b7272cdc
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      Makefile

+ 3 - 1
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)}; \