Skip to content

Commit

Permalink
assist: add classification code and emit even on execution (#28492) (#…
Browse files Browse the repository at this point in the history
…29811)

Co-authored-by: Hugo Shaka <hugo.hervieux@goteleport.com>
  • Loading branch information
jakule and hugoShaka committed Jul 31, 2023
1 parent af7dbe2 commit 86e49cc
Show file tree
Hide file tree
Showing 14 changed files with 2,666 additions and 906 deletions.
1,125 changes: 906 additions & 219 deletions api/gen/proto/go/usageevents/v1/usageevents.pb.go

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions api/proto/teleport/usageevents/v1/usageevents.proto
Expand Up @@ -354,6 +354,29 @@ message AssistCompletionEvent {
int64 completion_tokens = 4;
}

// AssistExecutionEvent is an event that is emitted when an Assist command
// execution is triggered by the user.
message AssistExecutionEvent {
// ConversationId is the UUID that identifies a single Assist conversation
string conversation_id = 1;
// NodeCount is the number of nodes the command was executed on
int64 node_count = 2;
// TotalTokens is the total amount of token used to satisfy this request
int64 total_tokens = 3;
// PromptTokens is the amount of estimated tokens used by the prompt
int64 prompt_tokens = 4;
// CompletionTokens is the amount of tokens that the completion response consists of
int64 completion_tokens = 5;
}

// AssistNewConversationEvent is an event that is emitted for each new Assist
// conversation and contains the conversation category.
message AssistNewConversationEvent {
// Category is the conversation category. This represents what kind of request
// the user is asking Assist.
string category = 1;
}

// IntegrationEnrollKind represents the types of integration that
// can be enrolled.
enum IntegrationEnrollKind {
Expand Down Expand Up @@ -437,6 +460,8 @@ message UsageEventOneOf {
UIIntegrationEnrollStartEvent ui_integration_enroll_start_event = 31;
UIIntegrationEnrollCompleteEvent ui_integration_enroll_complete_event = 32;
UIOnboardQuestionnaireSubmitEvent ui_onboard_questionnaire_submit = 33;
AssistExecutionEvent assist_execution = 34;
AssistNewConversationEvent assist_new_conversation = 35;
}
reserved 2; //UIOnboardGetStartedClickEvent
reserved "ui_onboard_get_started_click";
Expand Down

0 comments on commit 86e49cc

Please sign in to comment.