피드백 집계
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
}
'import requests
url = "https://api.example.com/feedback/aggregate"
payload = {
"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
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://api.example.com/feedback/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/feedback/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/feedback/aggregate"
payload := strings.NewReader("{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/feedback/aggregate")
.header("Content-Type", "application/json")
.body("{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}유형 지정 Scorer 피드백(tags, 평점)을 시간 버킷별로 집계합니다.
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
}
'import requests
url = "https://api.example.com/feedback/aggregate"
payload = {
"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
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://api.example.com/feedback/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/feedback/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/feedback/aggregate"
payload := strings.NewReader("{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/feedback/aggregate")
.header("Content-Type", "application/json")
.body("{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"project_id\": \"<string>\",\n \"feedback_types\": [\n \"<string>\"\n ],\n \"group_by\": [],\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"rating_max\": 0.5,\n \"rating_min\": 0.5,\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"time_bucket_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}본문
application/json
시간 버킷 및 차원별 집계 점수에 대한 쿼리입니다.
created_at의 포함 하한입니다(에포크 이후 밀리초).
필수 범위:
x >= 0created_at의 제외 상한입니다(에포크 이후 밀리초).
필수 범위:
x >= 0예시:
"entity/project"
feedback_type을 접두사 기준으로 필터링
허용값: ['scorer_id', 'span_agent_name', 'span_agent_version', 'span_status_code'].
사용 가능한 옵션:
scorer_id, span_agent_name, span_agent_version, span_status_code 이 monitor ids로 필터링합니다(정확히 일치, 접두사 일치는 접미사 '*' 사용).
평점이 이 값 이하인 행만 포함
필수 범위:
0 <= x <= 1평점이 이 값 이상인 행만 포함
필수 범위:
0 <= x <= 1이 scorer ids로 필터링합니다(정확히 일치, 접두사 일치는 접미사 '*' 사용).
span_agent_name이 다음 값 중 하나와 정확히 일치하는 피드백으로 필터링합니다.
span 유형(turn 또는 conversation)으로 필터링합니다.
사용 가능한 옵션:
agent_turn, agent_conversation 지정된 tags 중 하나라도 포함하는 피드백으로 필터링
시간 버킷 크기(초)입니다. 예: 1시간 버킷의 경우 3600
필수 범위:
x > 0⌘I