-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Refactor #864
Conversation
Merging to refactor branch so that we can work async on the missing functionality
Add standardised benchmarking capabilities, changes to lean_agent
.langchain.db
Outdated
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.
Was this added intentionally?
Edit: I assume not, given it's in the .gitignore
, change made in #882
- collect: Collect send learning data for analysis and improvement. | ||
- collect: Collect send learning tools for analysis and improvement. | ||
- file_selector: Selecting files using GUI and terminal-based file explorer. | ||
- learning: Tools and data structures for data collection. | ||
- learning: Tools and tools structures for tools collection. |
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.
Looks like a search-replace gone wrong?
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.
agreed
|
||
Note: | ||
This function is only called if consent is given to share data. | ||
This function is only called if consent is given to share tools. |
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.
Lots of these s/data/tools that seems to be a mistake, might want to grep the diff for tools
and go through them all.
Edit: I did so in #882
Attributes: | ||
path (str): The file path where the `Agent` will operate, used for version management and | ||
file operations. | ||
version_manager (BaseVersionManager): An object that adheres to the VersionManagerInterface, | ||
responsible for version control of the generated code. Defaults to `VersionManager` | ||
if not provided. PROBABLY GIT SHOULD BE USED IN THE DEFAULT | ||
step_bundle (StepBundleInterface): Workflows of code generation steps that define the behavior of gen_code and | ||
improve. | ||
ai (AI): Manages calls to the LLM. | ||
|
||
Methods: | ||
__init__(self, path: str, version_manager: VersionManagerInterface = None, | ||
step_bundle: StepBundleInterface = None, ai: AI = None): | ||
Initializes a new instance of the Agent class with the provided path, version manager, | ||
step bundle, and AI. It falls back to default instances if specific components are not provided. | ||
|
||
init(self, prompt: str) -> Code: | ||
Generates a new piece of code using the AI and step bundle based on the provided prompt. | ||
It also snapshots the generated code using the version manager. | ||
|
||
Parameters: | ||
prompt (str): A string prompt that guides the code generation process. | ||
|
||
Returns: | ||
Code: An instance of the `Code` class containing the generated code. | ||
|
||
improve(self, prompt: str) -> Code: | ||
Improves an existing piece of code using the AI and step bundle based on the provided prompt. | ||
It also snapshots the improved code using the version manager. | ||
|
||
Parameters: | ||
prompt (str): A string prompt that guides the code improvement process. | ||
|
||
Returns: | ||
Code: An instance of the `Code` class containing the improved code. |
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 curious: why aren't these generated with things like autodoc?
The project has a lot of docstrings which seem a pain to manually maintain and keep up-to-date, which autodoc would simplify massively (at the cost of not getting it exactly how you want it, which imo is a good thing as it prevents bikeshedding).
Reminds me of this video
Edit: I realize now that you do use autodoc, but it isn't really working (and would still duplicate a lot of work):
If of interest, I could take a stab at cleaning this up (after this PR is merged).
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.
Would be amazing if you could have a shot at this once we merge.
self.preprompts_holder = preprompts_holder or PrepromptsHolder(PREPROMPTS_PATH) | ||
|
||
@classmethod | ||
def with_default_config( |
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.
This doesn't seem to do anything different than __init__
, can be removed.
* build(deps): removed unused click dependency (now using typer) * chore: remove redundant default ruff ignore config * chore: remove redundant default black exclude config * docs: added docstring to cli main, shown for `gpt-engineer --help`
…ersion requirement (">=3.8.1,<3.12")
Closing this in favor of the super PR #886 |
And here it comes! The request to merge the refactored gpt-engineer into main.
Main changes:
Reviews highly appreciated!