Skip to content

Commit

Permalink
fix: unify hardcoded event mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
skoob13 committed Oct 24, 2024
1 parent 3dadcdc commit 800ff09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ee/hogai/hardcoded_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 1 addition & 8 deletions ee/hogai/trends/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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:
Expand Down

0 comments on commit 800ff09

Please sign in to comment.