Skip to content
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

Add OpenAI API key parameter and refactor file handling #4

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

rminchev1
Copy link
Owner

This commit introduces the OpenAI API key as a parameter in the AI class and the create_chat_model function. This allows for more flexible configuration of the AI model.

Additionally, the handling of files and chat content has been refactored. A new function, to_files_, has been added to parse the chat and add all extracted files to the workspace. The overwrite_files function has been updated to store the chat content in the project_metadata DB instead of the workspace DB.

The DBs class has been extended with a new attribute, project_metadata, to store metadata related to the project. This attribute is also initialized in the main function.

Lastly, the execute_entrypoint function has been commented out in the SIMPLE configuration of the STEPS dictionary. This change seems to be temporary and might be reverted in the future.

This commit introduces the OpenAI API key as a parameter in the AI class and the create_chat_model function. This allows for more flexible configuration of the AI model.

Additionally, the handling of files and chat content has been refactored. A new function, to_files_, has been added to parse the chat and add all extracted files to the workspace. The overwrite_files function has been updated to store the chat content in the project_metadata DB instead of the workspace DB.

The DBs class has been extended with a new attribute, project_metadata, to store metadata related to the project. This attribute is also initialized in the main function.

Lastly, the execute_entrypoint function has been commented out in the SIMPLE configuration of the STEPS dictionary. This change seems to be temporary and might be reverted in the future.
The file name "README.md" has been changed to "LAST_MODIFICATION_README.md" in the parse_chat and overwrite_files functions. This change is reflected in the appending of the file name to the files list and the conditional check in the overwrite_files function. This is to ensure that the last modification readme file is correctly identified and updated. Also to allow to ask the LLM to update the README.md, if any in the project
Adjusted the string concatenation in the gen_entrypoint function to enhance readability. This change breaks the string across two lines, making the code more maintainable and easier to understand.
The import statements in the steps.py file have been reordered to improve code readability and maintainability. The 'os' module is now imported after the 'inspect' module. This change does not affect the functionality of the code.
@rminchev1 rminchev1 merged commit 39e4207 into base/main Oct 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant