diff --git a/cognition_objects/message.py b/cognition_objects/message.py index 5bde633f..bc44c10c 100644 --- a/cognition_objects/message.py +++ b/cognition_objects/message.py @@ -97,6 +97,7 @@ def update( message_id: str, answer: Optional[str] = None, facts: Optional[List[Dict[str, Any]]] = None, + relations: Optional[List[Dict[str, Any]]] = None, selection_widget: Optional[List[Dict[str, Any]]] = None, feedback_value: Optional[str] = None, feedback_category: Optional[str] = None, @@ -108,6 +109,8 @@ def update( message.answer = answer if facts is not None: message.facts = facts + if relations is not None: + message.relations = relations if selection_widget is not None: message.selection_widget = selection_widget if feedback_value is not None: diff --git a/enums.py b/enums.py index dd3e47af..11bc7ad3 100644 --- a/enums.py +++ b/enums.py @@ -587,6 +587,7 @@ class CognitionInterfaceType(Enum): class EmitType(Enum): ANSWER = "ANSWER" RETRIEVAL_RESULTS = "RETRIEVAL_RESULTS" + RETRIEVAL_RELATIONS = "RETRIEVAL_RELATIONS" FOLLOW_UPS = "FOLLOW_UPS" SELECTION = "SELECTION" QUERY_REPHRASING = "QUERY_REPHRASING" diff --git a/models.py b/models.py index 0744b744..b6665083 100644 --- a/models.py +++ b/models.py @@ -1151,6 +1151,7 @@ class CognitionMessage(Base): created_at = Column(DateTime, default=sql.func.now()) question = Column(String) facts = Column(ARRAY(JSON)) + relations = Column(ARRAY(JSON)) selection_widget = Column(ARRAY(JSON)) answer = Column(String)