Make report_assistant_event
take an AssistantEvent
struct (#18741)
This PR makes the `report_assistant_event` method take an `AssistantEvent` struct instead of all of the struct fields as individual parameters. Release Notes: - N/A
This commit is contained in:
parent
07e808d16f
commit
e3a6f89e2d
4 changed files with 44 additions and 59 deletions
|
@ -46,7 +46,7 @@ use std::{
|
|||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use telemetry_events::{AssistantKind, AssistantPhase};
|
||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||
use text::BufferSnapshot;
|
||||
use util::{post_inc, ResultExt, TryFutureExt};
|
||||
use uuid::Uuid;
|
||||
|
@ -2133,14 +2133,14 @@ impl Context {
|
|||
});
|
||||
|
||||
if let Some(telemetry) = this.telemetry.as_ref() {
|
||||
telemetry.report_assistant_event(
|
||||
Some(this.id.0.clone()),
|
||||
AssistantKind::Panel,
|
||||
AssistantPhase::Response,
|
||||
model.telemetry_id(),
|
||||
telemetry.report_assistant_event(AssistantEvent {
|
||||
conversation_id: Some(this.id.0.clone()),
|
||||
kind: AssistantKind::Panel,
|
||||
phase: AssistantPhase::Response,
|
||||
model: model.telemetry_id(),
|
||||
response_latency,
|
||||
error_message,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if let Ok(stop_reason) = result {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue