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

Flexible configuration system for RKLLAMA #19

Merged
merged 4 commits into from
Mar 15, 2025

Conversation

TomJacobsUK
Copy link
Contributor

This pull request introduces a new flexible configuration system for RKLLAMA, which includes changes to multiple files to support this new system. The changes involve updating the configuration handling, modifying how scripts and the client handle configuration, and adding new configuration schema and documentation.

#18

Configuration System Enhancements:

  • README.md: Added a new section on configuration, explaining how RKLLAMA uses a flexible configuration system that loads settings from multiple sources in a priority order.
  • documentation/configuration.md: Added comprehensive documentation for the new configuration system, detailing configuration sources, file locations, format, environment variables, command-line arguments, and usage of the configuration API.

Codebase Updates:

  • client.py: Refactored to use the new configuration system, removing direct file handling and replacing it with calls to the config module. This includes changes to how the server port and script paths are determined. [1] [2] [3] [4]
  • client.sh: Updated to determine the application root dynamically, source configuration from a new environment file, and handle arguments more cleanly. This includes changes to how the port is specified and how the Python script is executed. [1] [2] [3]

New Files:

  • config/default.ini: Added a default configuration file that will be automatically generated at startup if it does not exist. It includes default settings for server, paths, model, and platform sections.
  • config_schema.py: Introduced a new module defining the configuration schema, including field types, validation logic, and schema creation for RKLLAMA.

Script Enhancements:

  • lib/fix_freq_rk3576.sh: Added debug mode support, allowing conditional logging based on the debug mode argument.

@NotPunchnox NotPunchnox merged commit 9c3e524 into NotPunchnox:main Mar 15, 2025
1 of 2 checks 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.

2 participants