From 800ff095de7ee69635472eddf3015230072bfa95 Mon Sep 17 00:00:00 2001 From: Georgiy Tarasov Date: Thu, 24 Oct 2024 16:13:47 +0200 Subject: [PATCH] fix: unify hardcoded event mapping --- ee/hogai/hardcoded_definitions.py | 2 +- ee/hogai/trends/nodes.py | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ee/hogai/hardcoded_definitions.py b/ee/hogai/hardcoded_definitions.py index 5b57ed11113e2..166c53bf87c0c 100644 --- a/ee/hogai/hardcoded_definitions.py +++ b/ee/hogai/hardcoded_definitions.py @@ -54,7 +54,7 @@ }, "$identify": { "label": "Identify", - "description": "A user has been identified with properties", + "description": "Identifies an anonymous user. This event doesn't show how many users you have but rather how many users used an account.", }, "$create_alias": { "label": "Alias", diff --git a/ee/hogai/trends/nodes.py b/ee/hogai/trends/nodes.py index 6c965fd82d3d3..792dbdeb88c16 100644 --- a/ee/hogai/trends/nodes.py +++ b/ee/hogai/trends/nodes.py @@ -132,10 +132,6 @@ def _model(self) -> ChatOpenAI: @cached_property def _events_prompt(self) -> str: - event_description_mapping = { - "$identify": "Identifies an anonymous user. This event doesn't show how many users you have but rather how many users used an account." - } - response = TeamTaxonomyQueryRunner(TeamTaxonomyQuery(), self._team).run( ExecutionMode.RECENT_CACHE_CALCULATE_BLOCKING_IF_STALE ) @@ -150,10 +146,7 @@ def _events_prompt(self) -> str: for event_name in events: event_tag = event_name - if event_name in event_description_mapping: - description = event_description_mapping[event_name] - event_tag += f" - {description}" - elif event_name in hardcoded_prop_defs["events"]: + if event_name in hardcoded_prop_defs["events"]: data = hardcoded_prop_defs["events"][event_name] event_tag += f" - {data['label']}. {data['description']}" if "examples" in data: