메인 콘텐츠로 건너뛰기
POST
/
threads
/
stream_query
스레드 쿼리 스트림
curl --request POST \
  --url https://api.example.com/threads/stream_query \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "filter": {
    "after_datetime": "2024-01-01T00:00:00Z",
    "before_datetime": "2024-12-31T23:59:59Z",
    "thread_ids": [
      "thread_1",
      "thread_2",
      "my_thread_id"
    ]
  },
  "limit": 123,
  "offset": 123,
  "sort_by": [
    {
      "direction": "desc",
      "field": "last_updated"
    }
  ]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

인증

Authorization
string
header
필수

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

본문

application/json

턴 호출 기준으로만 집계한 통계를 사용해 스레드를 쿼리합니다.

턴 호출은 스레드 컨텍스트의 직계 자식(여기서 call.id == turn_id)으로, 전체 중첩 구현 세부정보를 모두 포함하는 대신 대화 단위에서 의미 있는 통계를 제공합니다.

project_id
string
필수

프로젝트의 ID

예시:

"my_entity/my_project"

filter
ThreadsQueryFilter · object

스레드 쿼리에 사용할 필터 조건

limit
integer | null

반환할 최대 스레드 개수

offset
integer | null

건너뛸 스레드 개수

sort_by
SortBy · object[] | null

스레드를 정렬할 기준입니다. 지원되는 필드: 'thread_id', 'turn_count', 'start_time', 'last_updated', 'p50_turn_duration_ms', 'p99_turn_duration_ms'.

예시:
[
{
"direction": "desc",
"field": "last_updated"
}
]

응답

성공 응답