For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/agent-observability/create-or-update-annotations.md. A documentation index is available at /llms.txt.
Language
Datadog site

주석 생성 또는 업데이트

경고Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.us3.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.us5.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.datadoghq.eu/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.ap1.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.ap2.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.uk1.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotationshttps://api.us2.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations

개요

대기열 내 상호작용에 대한 주석을 생성하거나 업데이트합니다. 각 주석은 interaction_id 및 요청한 사용자의 ID를 기준과 일치합니다. 응답의 결과 및 오류는 interaction_id를 통해 요청 항목과 연결됩니다. 개별 항목에 대한 오류는 나머지 배치 작업을 차단하지 않고 errors 필드에 반환됩니다. 모든 항목이 대기열 액세스 규칙에 의해 거부된 요청은 403을 반환합니다.

인수

경로 파라미터

이름
유형
설명
queue_id [required]
string

The ID of the Agent Observability annotation queue.

요청

Body Data (required)

주석 생성 또는 업데이트를 위한 페이로드입니다.

항목
유형
설명
data [required]
object

주석 대기열 내 상호작용에 대한 주석 생성 또는 업데이트 요청입니다.

응답

OK — annotations created or updated. For mixed batches, denied items and other per-item errors are listed in errors.

Response containing the created or updated annotations.

항목
유형
설명
data [required]
object

Data object for the annotations response.

코드 예시

주석 생성 또는 업데이트
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF
# Path parameters
export queue_id="00000000-0000-0000-0000-000000000001"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotations": [
        {
          "interaction_id": "00000000-0000-0000-0000-000000000001",
          "label_values": [
            {
              "label_schema_id": "abc-123",
              "value": "good"
            },
            {
              "label_schema_id": "ef56gh78",
              "value": "positive"
            }
          ]
        }
      ]
    },
    "type": "annotations"
  }
}
EOF