Skip to content

Commit

Permalink
add SeerSimilarIssueData dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed May 3, 2024
1 parent 5a2556a commit b52061e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/sentry/seer/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
from dataclasses import dataclass
from typing import NotRequired, TypedDict

import sentry_sdk
Expand Down Expand Up @@ -106,6 +107,17 @@ class SimilarIssuesEmbeddingsResponse(TypedDict):
responses: list[RawSeerSimilarIssueData]


# Like the data that comes back from seer, but guaranteed to have a parent group id
@dataclass
class SeerSimilarIssueData:
stacktrace_distance: float
message_distance: float
should_group: bool
parent_group_id: int
# TODO: See if we end up needing the hash here
parent_group_hash: str | None = None


def get_similar_issues_embeddings(
similar_issues_request: SimilarIssuesEmbeddingsRequest,
) -> SimilarIssuesEmbeddingsResponse:
Expand Down

0 comments on commit b52061e

Please sign in to comment.