Configuration management and validation for LMOS (Language Model Orchestration System)
LMOS-Config provides a unified configuration system for the entire LMOS ecosystem. It includes schema validation, IDE support via JSON schema, and flexible loading options for both local and HTTP-based configurations. S3 integration planned.
- 🔍 Schema Validation: Pydantic-based validation for all configuration options
- 💡 IDE Integration: VSCode integration with JSON schema for autocompletion
- 🌐 Flexible Loading: Support for both local and HTTP-based configuration files
- 🔄 Auto-generated Schema: GitHub Actions workflow to maintain up-to-date JSON schema
- 📝 YAML & JSON Support: Load configurations from either YAML or JSON formats
Add the schema reference to your YAML config file to enable auto complete:
# yaml-language-server: $schema=https://lmos-io.github.io/LMOS-config/schema.json
internal_configuration:
redis:
redis_url: redis://localhost:6379
# ... more configurationSet LMOS_CONFIG_YAML_PATH env var to the path for your config.yaml IE: "path/to/your/config.yaml"
Set LMOS_CONFIG_HTTP_URL env var to the url for your config.yaml IE: "https://example.com/config.yaml"
- Redis: Connection settings for Redis
- Database: Database connection configuration
- Prometheus: Logging and monitoring settings
- Router: LMOS Router settings
- LLM Runner: Language model service configurations
- STT Runner: Speech-to-text service configurations
- TTS Runner: Text-to-speech service configurations
- Rerank Runner: Document reranking service configurations
# Install dependencies
pip install -r requirements.txt# Generate new schema.json
python export-schema.py# Test local configuration loading
python quick_test_local.py
# Test HTTP configuration loading
python quick_test_http.pyThe repository includes a GitHub Actions workflow (schema_gen.yml) that:
- Generates the JSON schema from the Pydantic models
- Deploys the schema to GitHub Pages
- Makes it available at
https://lmos-io.github.io/LMOS-config/schema.json
├── lmos_config/
│ ├── ConfigTypes/
│ │ └── base.py # Core configuration models
│ ├── http_config.py # HTTP configuration loader
│ └── local_config.py # Local configuration loader
├── example_configurations/ # Example configuration files
├── export-schema.py # Schema generation script
└── .github/workflows/ # CI/CD workflows
- Join the discord, chat about what you'd like to do
- Fork the repository
- Create a feature branch
- Submit a pull request
Apache 2.0 - See LICENSE for details
This package is part of the larger LMOS (Language Model Orchestration System) ecosystem. Visit LMOS.io to learn more about our other packages and services.