메인 콘텐츠로 건너뛰기
POST
/
feedback
/
aggregate
피드백 집계
curl --request POST \
  --url https://api.example.com/feedback/aggregate \
  --header 'Content-Type: application/json' \
  --data '
{
  "after_ms": 1,
  "before_ms": 1,
  "project_id": "<string>",
  "feedback_types": [
    "<string>"
  ],
  "group_by": [],
  "monitor_ids": [
    "<string>"
  ],
  "rating_max": 0.5,
  "rating_min": 0.5,
  "scorer_ids": [
    "<string>"
  ],
  "span_agent_names": [
    "<string>"
  ],
  "span_types": [],
  "tags": [
    "<string>"
  ],
  "time_bucket_seconds": 1
}
'
{
  "after_ms": 123,
  "before_ms": 123,
  "buckets": [
    {
      "scored_count": 123,
      "total_count": 123,
      "group": {},
      "rating_counts": {},
      "rating_sums": {},
      "tag_counts": {},
      "time_bucket_start_ms": 123
    }
  ],
  "time_bucket_seconds": 123
}

본문

application/json

시간 버킷 및 차원별 집계 점수에 대한 쿼리입니다.

after_ms
integer
필수

created_at의 포함 하한입니다(에포크 이후 밀리초).

필수 범위: x >= 0
before_ms
integer
필수

created_at의 제외 상한입니다(에포크 이후 밀리초).

필수 범위: x >= 0
project_id
string
필수
예시:

"entity/project"

feedback_types
string[]

feedback_type을 접두사 기준으로 필터링

group_by
enum<string>[]

허용값: ['scorer_id', 'span_agent_name', 'span_agent_version', 'span_status_code'].

사용 가능한 옵션:
scorer_id,
span_agent_name,
span_agent_version,
span_status_code
monitor_ids
string[]

이 monitor ids로 필터링합니다(정확히 일치, 접두사 일치는 접미사 '*' 사용).

rating_max
number | null

평점이 이 값 이하인 행만 포함

필수 범위: 0 <= x <= 1
rating_min
number | null

평점이 이 값 이상인 행만 포함

필수 범위: 0 <= x <= 1
scorer_ids
string[]

이 scorer ids로 필터링합니다(정확히 일치, 접두사 일치는 접미사 '*' 사용).

span_agent_names
string[]

span_agent_name이 다음 값 중 하나와 정확히 일치하는 피드백으로 필터링합니다.

span_types
enum<string>[]

span 유형(turn 또는 conversation)으로 필터링합니다.

사용 가능한 옵션:
agent_turn,
agent_conversation
tags
string[]

지정된 tags 중 하나라도 포함하는 피드백으로 필터링

time_bucket_seconds
integer | null

시간 버킷 크기(초)입니다. 예: 1시간 버킷의 경우 3600

필수 범위: x > 0

응답

성공 응답

집계된 Scorer 피드백의 희소 시계열입니다(빈 버킷은 생략됨).

after_ms
integer
필수

확정된 포함 하한으로, Unix 에포크 밀리초(UTC)입니다.

before_ms
integer
필수

확정된 제외 상한으로, Unix 에포크 밀리초(UTC)입니다.

buckets
FeedbackAggregateBucket · object[]
time_bucket_seconds
integer | null

사용된 시간 버킷 크기(초)입니다. 버킷이 없으면 None입니다.