-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified Configuration File in TOML Format #1174
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had these old pending review comments
is_file_selection = true | ||
|
||
# Git Filter Configuration | ||
[git_filter] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest this section be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agreed. Once all the functions are finalized, we'll rename this section and revise all the names in a subsequent commit. For now, I've just placed some placeholders here to help identify and locate all configurations.
config.toml
Outdated
[api] | ||
# API key for OpenAPI | ||
# OPENAI_API_KEY=Your personal OpenAI API key from https://platform.openai.com/account/api-keys | ||
OPENAI_API_KEY = "your_api_key_here" | ||
ANTHROPIC_API_KEY = "your_anthropic_api_key_here" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest not adding this here, since the configuration file is checked into git. Let users handle it with env vars/dotenv imo, or by a separate config file (~/.config/gpt-engineer/config.toml
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ATheorell and I have agreed to keep all the current behaviour intact while providing an additional option to toggle all configurations in a unified way. The current interfaces, like CLI commands and env files, will still have higher priority. If the user doesn't provide one, GPT-engineer will default to using the config.toml file, offering a more convenient way for users to view and adjust all configurations simultaneously. This approach ensures flexibility while maintaining ease of use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, the reason for placing the config.toml
file in the root directory is to accommodate users who might not be very tech-savvy. Having a one-stop configuration file in the root can save them a lot of time and make the setup process much more straightforward.
@@ -0,0 +1,34 @@ | |||
# config.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, isn't this configuration file gpt-engineer specific?
It would probably be a confusingly general name for most projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agreed. I will do that in the following commits.
PR Introduction: Unified Configuration File in TOML Format
Feature Description
Based on issue #1165, this PR introduces a unified configuration file in TOML format for the gpt-engineer project. This file will centralize various project settings, including:
The configuration file will be persistent on disk and presented to users upon each application run, with an option to bypass opening the file while being notified of its existence and purpose.
Motivation and Application
The project manages configurations through multiple files, complicating maintenance and user experience. A unified configuration file will simplify management, enhance maintainability, and provide a consistent method for setting and reviewing configurations. The TOML format ensures readability and ease of use.
Implementation Plan
config.toml
: Located in the project root directory, loaded at the start ofgpte
execution.project_config.py
: Adapted to parse the new configuration.file_selector.py
: Remove the part for old linting option.steps.py
: Get or set the configs in the main function when needed.