DEV Community

Bryce Seefieldt
Bryce Seefieldt

Posted on

Escalating NeoGPT contribution

I am continuing to build on my work on the NeoGPT customizable GPT chatbot project. My last efforts were focused on creating a function that can read the current program configurations and export them to a yaml file. I created this function based on the parameters defined in the existing config.py module which was called in the main.py program at runtime in order to establish the current configuration details to define how the current session will be run.

The implementation of the export_config function required reading settings defined in both config.py as well as the pyproject.toml file to be able to capture a snapshot of a variety of configuration parameters at the time the export_config function is called.

To expand on my contribution to this project I have conferred with the project author to determine some next steps required to allow this function to be utilized as well as to add the functionality that allows the configuration yaml files to be read and parsed in order to load the configuration settings saved in the yaml file, such that the program build is configured to the saved settings.
The requirements to implement this expanded functionality include:

  • Adding a -export config_x.yml command line switch that executes the export_config function from CLI and allows the user to define the yaml filename in which to save the current config settings.
  • Define a load_config function that can be called to read a specified yaml configuration file and load the defined settings to overwrite the current build configuration.
  • Adding an -load config_x.yml command line switch that executes the load_config function from CLI and allows the user to define the file which should be read in order to update/overwrite the current config settings.

This will require a deeper analysis of the projects source code. Creating the export_config function only required scraping the value of various parameters defined in config.py and pyproject.toml and writing them to file in the required format. These next steps however will require looking at each step of the programs build and run process, assessing the methods used to set each individual configuration parameter and passing the saved parameters to each individual method such that it overwrites the current settings with the stored value.
This should be an interesting deep-dive into the program that will give me a much better understanding of a significant portion of this programs executable codebase.

Top comments (0)