- Storage mode: for use in `self._settings`. All fields should be specified, i.e. should not be `NOT_GIVEN`. - Delta mode: for use in `*UpdateSettingsFrame`. In service of this, this commit: - Adds a runtime check that all fields are specified in storage mode - Updates all services to specify all fields in stored settings - Updates all services to no longer check for `is_given` in stored settings (not necessary anymore) - Updates relevant docstrings - Renames `update` to `delta` in `*UpdateSettingsFrame` - Updates community integrations guide
20 lines
513 B
Markdown
20 lines
513 B
Markdown
- Added support for using strongly-typed objects instead of dicts for updating service settings at runtime.
|
|
|
|
Instead of, say:
|
|
|
|
```python
|
|
await task.queue_frame(
|
|
STTUpdateSettingsFrame(settings={"language": Language.ES})
|
|
)
|
|
```
|
|
|
|
you'd do:
|
|
|
|
```python
|
|
await task.queue_frame(
|
|
STTUpdateSettingsFrame(delta=DeepgramSTTSettings(language=Language.ES))
|
|
)
|
|
```
|
|
|
|
Each service now vends strongly-typed classes like `DeepgramSTTSettings` representing the service's runtime-updatable settings.
|