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-a-new-agent-observability-prompt-version.md. A documentation index is available at /llms.txt.
Language
Datadog site

새로운 Agent Observability 프롬프트 버전 생성

경고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/prompts/{prompt_id}/versionshttps://api.us3.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.us5.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.datadoghq.eu/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.ap1.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.ap2.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.uk1.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.ddog-gov.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versionshttps://api.us2.ddog-gov.com/api/v2/llm-obs/v1/prompts/{prompt_id}/versions

개요

기존 Agent Observability 프롬프트의 새 버전을 생성합니다.

This endpoint requires all of the following permissions:

  • llm_observability_read
  • llm_observability_write
  • feature_flag_config_read
  • feature_flag_config_write
  • feature_flag_environment_config_read

인수

경로 파라미터

이름
유형
설명
prompt_id [required]
string

The customer-provided identifier of the Agent Observability prompt.

요청

Body Data (required)

프롬프트 버전 페이로드를 생성합니다.

항목
유형
설명
data [required]
object

Agent Observability 프롬프트의 새 버전을 생성하도록 요청합니다.

응답

OK

Response containing a specific version of an Agent Observability prompt.

항목
유형
설명
data [required]
object

Data object for a specific version of an Agent Observability prompt.

코드 예시

새로운 Agent Observability 프롬프트 버전 생성
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF
## Create a version that includes all or selected messages from other prompts

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "template": {
        "messages": [
          {
            "include": {
              "prompt_id": "assistant-introduction",
              "version": 2
            }
          },
          {
            "include": {
              "items": [
                2,
                0,
                0
              ],
              "prompt_id": "response-examples",
              "version": 4
            }
          },
          {
            "content": "Answer {{question}}.",
            "role": "user"
          }
        ]
      }
    },
    "type": "prompt-template-versions"
  }
}
EOF

## Create a version that includes text from another prompt

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Reuse the exact response policy.",
      "template": "{{>response-policy version=3}}\n\nAnswer {{question}}."
    },
    "type": "prompt-template-versions"
  }
}
EOF

## default

# Path parameters
export prompt_id="customer-support-assistant"

# 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/prompts/${prompt_id}/versions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "model": "provider-model",
        "temperature": 0.4
      },
      "description": "Give concise answers and cite relevant help-center articles.",
      "template": [
        {
          "content": "You are a helpful customer support assistant for {{company_name}}.",
          "role": "system"
        },
        {
          "content": "Help {{customer_name}} with this question: {{question}}",
          "role": "user"
        }
      ]
    },
    "type": "prompt-template-versions"
  }
}
EOF