utils
Class info¶
🛈 DocStrings¶
Utility functions for the config package.
merge_models
¶
Deep merge two Pydantic models.
Source code in src/llmling/config/utils.py
prepare_runtime
¶
prepare_runtime(
runtime_cls: type[RuntimeConfig],
source: JoinablePathLike | Config,
*,
validate: bool = True,
strict: bool = False
) -> RuntimeConfig
Prepare runtime configuration from source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runtime_cls
|
type[RuntimeConfig]
|
RuntimeConfig class to instantiate |
required |
source
|
JoinablePathLike | Config
|
Path to configuration file or Config object |
required |
validate
|
bool
|
Whether to validate config |
True
|
strict
|
bool
|
Whether to raise on validation warnings |
False
|
Returns:
| Type | Description |
|---|---|
RuntimeConfig
|
Initialized runtime configuration |
Raises:
| Type | Description |
|---|---|
TypeError
|
If source type is invalid |
ConfigError
|
If validation fails in strict mode |