From dba82d2dba90bb39b0bbaa9f4fff1d5ef9f72591 Mon Sep 17 00:00:00 2001 From: pseusys Date: Wed, 23 Oct 2024 19:30:08 +0800 Subject: [PATCH] origin_interface getter fixed --- chatsky/core/context.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chatsky/core/context.py b/chatsky/core/context.py index f8d731184..3c8dc9b74 100644 --- a/chatsky/core/context.py +++ b/chatsky/core/context.py @@ -150,9 +150,10 @@ class Context(BaseModel): @property def origin_interface(self) -> Optional[str]: if 1 in self.requests.keys(): - return self.requests[1].origin_interface - else: - return None + origin = self.requests[1].origin + if origin is not None: + return origin.origin_interface + return None @classmethod def init(cls, start_label: AbsoluteNodeLabelInitTypes, id: Optional[Union[UUID, int, str]] = None):