Skip to content

Commit

Permalink
collab: Attach additional properties to Language Model Used event (#…
Browse files Browse the repository at this point in the history
…21770)

This PR attaches two new properties to the `Language Model Used` event:

- `has_llm_subscription` - This will tell us if a user is a paid
subscriber.
- `max_monthly_spend_in_cents` - This will indicate what their maximum
monthly spend is set to.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Dec 9, 2024
1 parent bdeac79 commit 158cdc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/collab/src/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ impl<S> Drop for TokenCountingStream<S> {
);

let properties = json!({
"has_llm_subscription": claims.has_llm_subscription,
"max_monthly_spend_in_cents": claims.max_monthly_spend_in_cents,
"plan": match claims.plan {
Plan::Free => "free".to_string(),
Plan::ZedPro => "zed_pro".to_string(),
Expand Down

0 comments on commit 158cdc3

Please sign in to comment.