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>
This commit is contained in:
ryanwclark1 2024-04-02 16:52:48 -05:00 committed by GitHub
parent fdbcdb84ee
commit b6b7272cdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)}; \