메인 콘텐츠로 건너뛰기
POST
/
agents
/
conversations
/
chat
GenAI 대화 채팅
curl --request POST \
  --url https://api.example.com/agents/conversations/chat \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "conversation_id": "<string>",
  "project_id": "<string>",
  "include_feedback": false,
  "limit": 50,
  "offset": 0
}
'
{
  "conversation_id": "<string>",
  "feedback": [
    {}
  ],
  "has_more": false,
  "limit": 50,
  "offset": 0,
  "total_turns": 0,
  "turns": [
    {
      "trace_id": "<string>",
      "feedback": [
        {}
      ],
      "messages": [
        {
          "agent_handoff": {},
          "agent_name": "<string>",
          "agent_start": {
            "model": "<string>",
            "system_instructions": "<string>",
            "tool_definitions": "<string>"
          },
          "assistant_message": {
            "text": "<string>",
            "content_refs": [
              "<string>"
            ],
            "duration_ms": 123,
            "input_tokens": 123,
            "model": "<string>",
            "output_tokens": 123,
            "reasoning_content": "<string>",
            "reasoning_tokens": 123
          },
          "context_compacted": {
            "compaction_items_after": 123,
            "compaction_items_before": 123,
            "compaction_summary": "<string>"
          },
          "feedback": [
            {}
          ],
          "span_id": "<string>",
          "started_at": "2023-11-07T05:31:56Z",
          "tool_call": {
            "content_refs": [
              "<string>"
            ],
            "duration_ms": 123,
            "tool_arguments": "<string>",
            "tool_name": "<string>",
            "tool_result": "<string>"
          },
          "user_message": {
            "text": "<string>",
            "content_refs": [
              "<string>"
            ]
          }
        }
      ],
      "provider": "<string>",
      "root_span_name": "<string>",
      "total_duration_ms": 123
    }
  ]
}

인증

Authorization
string
header
필수

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

본문

application/json

대화의 multi-turn 채팅 뷰를 조회하기 위한 요청입니다.

conversation_id
string
필수
project_id
string
필수
include_feedback
boolean
기본값:false
limit
integer
기본값:50

반환할 대화 턴의 최대 개수입니다.

필수 범위: 0 <= x <= 50
offset
integer
기본값:0

건너뛸 가장 최근 턴의 개수입니다. 결과는 선택한 페이지 내에서 시간순으로 반환됩니다.

필수 범위: x >= 0

응답

성공 응답

Multi-turn 채팅 뷰: 턴별 채팅 responses의 정렬된 목록입니다.

turns의 각 항목은 하나의 trace_id에 해당하며, Weave는 이를 하나의 대화 턴으로 처리합니다. 이는 반드시 하나의 invoke_agent span인 것은 아닙니다. 하나의 턴에는 에이전트 호출이 0개, 1개 또는 여러 개 포함될 수 있습니다. 프런트엔드는 항목 사이에 턴 번호 구분선을 렌더링하면서도 각 개별 턴에 대해 AgentTraceChatRes 렌더링을 계속 재사용할 수 있습니다.

conversation_id
string
필수
feedback
Feedback · object[] | null
has_more
boolean
기본값:false
limit
integer
기본값:50
offset
integer
기본값:0
total_turns
integer
기본값:0
turns
AgentTraceChatRes · object[]