Skip to content

Commit

Permalink
chore: add input to clickhouse rows (#20901)
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin authored Mar 13, 2024
1 parent 8fb3b9b commit dc0faa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ee/session_recordings/ai/embeddings_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def run(self, items: List[Any], embeddings_preparation: type[EmbeddingPreparatio
"session_id": session_id,
"embeddings": embeddings,
"source_type": source_type,
"input": input,
}
)
# we don't want to fail the whole batch if only a single recording fails
Expand Down Expand Up @@ -198,7 +199,7 @@ def _num_tokens_for_input(self, string: str) -> int:
def _flush_embeddings_to_clickhouse(self, embeddings: List[Dict[str, Any]], source_type: str) -> None:
try:
sync_execute(
"INSERT INTO session_replay_embeddings (session_id, team_id, embeddings, source_type) VALUES",
"INSERT INTO session_replay_embeddings (session_id, team_id, embeddings, source_type, input) VALUES",
embeddings,
)
SESSION_EMBEDDINGS_WRITTEN_TO_CLICKHOUSE.labels(source_type=source_type).inc(len(embeddings))
Expand Down

0 comments on commit dc0faa5

Please sign in to comment.