メインコンテンツへスキップ
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"
}
]

レスポンス

成功時のレスポンス