diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f990a93..2323b8d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added new `handle_sigint` and `handle_sigterm` to `RunnerArguments`. This + allows applications to know what settings they should use for the environment + they are running on. + - Added `processor` field to `ErrorFrame` to indicate `FrameProcessor` that generated the error. diff --git a/src/pipecat/runner/types.py b/src/pipecat/runner/types.py index d093b09dd..33bf3b160 100644 --- a/src/pipecat/runner/types.py +++ b/src/pipecat/runner/types.py @@ -10,7 +10,7 @@ These types are used by the development runner to pass transport-specific information to bot functions. """ -from dataclasses import dataclass +from dataclasses import dataclass, field from typing import Any from fastapi import WebSocket @@ -20,7 +20,12 @@ from fastapi import WebSocket class RunnerArguments: """Base class for runner session arguments.""" - pass + handle_sigint: bool = field(init=False) + handle_sigterm: bool = field(init=False) + + def __post_init__(self): + self.handle_sigint = True + self.handle_sigterm = False @dataclass