Add source parameter to ErrorFrame and set it in FrameProcessor. Updated error handling in AnthropicLLMService and DeepgramSTTService to include ErrorFrame with source information.
This commit is contained in:
@@ -652,10 +652,12 @@ class ErrorFrame(SystemFrame):
|
||||
Parameters:
|
||||
error: Description of the error that occurred.
|
||||
fatal: Whether the error is fatal and requires bot shutdown.
|
||||
source: The frame processor that generated the error.
|
||||
"""
|
||||
|
||||
error: str
|
||||
fatal: bool = False
|
||||
source: Optional[FrameProcessor] = None
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name}(error: {self.error}, fatal: {self.fatal})"
|
||||
|
||||
Reference in New Issue
Block a user