Skip to content

Commit 9bae7f3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 08dc061 of spec repo
1 parent 61d2b93 commit 9bae7f3

11 files changed

Lines changed: 1093 additions & 11 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 137 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63768,6 +63768,26 @@ components:
6376863768
required:
6376963769
- data
6377063770
type: object
63771+
LLMObsPromptAuthoringChatTemplate:
63772+
description: A chat prompt containing messages, pinned includes, or both.
63773+
items:
63774+
$ref: "#/components/schemas/LLMObsPromptAuthoringItem"
63775+
minItems: 1
63776+
type: array
63777+
x-generate-alias-as-model: true
63778+
LLMObsPromptAuthoringItem:
63779+
description: A chat message or an explicitly versioned prompt include.
63780+
oneOf:
63781+
- $ref: "#/components/schemas/LLMObsPromptChatMessage"
63782+
- $ref: "#/components/schemas/LLMObsPromptIncludeItem"
63783+
LLMObsPromptAuthoringMessagesTemplate:
63784+
description: A chat prompt whose authored items are stored under `messages`.
63785+
properties:
63786+
messages:
63787+
$ref: "#/components/schemas/LLMObsPromptAuthoringChatTemplate"
63788+
required:
63789+
- messages
63790+
type: object
6377163791
LLMObsPromptChatMessage:
6377263792
description: A single chat message in a prompt template.
6377363793
properties:
@@ -63891,6 +63911,47 @@ components:
6389163911
required:
6389263912
- id
6389363913
type: object
63914+
LLMObsPromptInclude:
63915+
additionalProperties: false
63916+
description: >-
63917+
An explicitly versioned prompt included as chat items. Omitting `items` includes every child message in its original order. When `items` is present, its zero-based indexes are inserted in the order provided; duplicate indexes are preserved.
63918+
properties:
63919+
items:
63920+
description: Optional ordered zero-based child-message indexes. Order and duplicate indexes are preserved.
63921+
items:
63922+
format: int64
63923+
maximum: 2147483647
63924+
minimum: 0
63925+
type: integer
63926+
minItems: 1
63927+
type: array
63928+
prompt_id:
63929+
description: >-
63930+
Customer-provided identifier of the included prompt. It cannot contain spaces, tabs, line breaks, braces, an equals sign, a comma, or quotes.
63931+
example: "response-policy"
63932+
minLength: 1
63933+
pattern: "^[^\\s{}=,\"']+$"
63934+
type: string
63935+
version:
63936+
description: Positive sequential version number of the included prompt.
63937+
example: 3
63938+
format: int64
63939+
maximum: 2147483647
63940+
minimum: 1
63941+
type: integer
63942+
required:
63943+
- prompt_id
63944+
- version
63945+
type: object
63946+
LLMObsPromptIncludeItem:
63947+
additionalProperties: false
63948+
description: An explicitly versioned whole-chat or selective-message include.
63949+
properties:
63950+
include:
63951+
$ref: "#/components/schemas/LLMObsPromptInclude"
63952+
required:
63953+
- include
63954+
type: object
6389463955
LLMObsPromptResponse:
6389563956
description: Response containing a single Agent Observability prompt.
6389663957
example:
@@ -63995,11 +64056,13 @@ components:
6399564056
- data
6399664057
type: object
6399764058
LLMObsPromptTemplate:
63998-
description: A text template or a list of chat messages.
64059+
description: >-
64060+
A text template, a list of chat messages, or an authored chat object. Text can include an exact prompt version with `{{>prompt-id version=N}}`. Use an authored chat object when including prompts as chat messages.
6399964061
example: "You are a helpful assistant for {{audience}}."
6400064062
oneOf:
6400164063
- $ref: "#/components/schemas/LLMObsPromptTextTemplate"
6400264064
- $ref: "#/components/schemas/LLMObsPromptChatTemplate"
64065+
- $ref: "#/components/schemas/LLMObsPromptAuthoringMessagesTemplate"
6400364066
LLMObsPromptTextTemplate:
6400464067
description: A text prompt template.
6400564068
minLength: 1
@@ -64030,11 +64093,14 @@ components:
6403064093
- attributes
6403164094
type: object
6403264095
LLMObsPromptVersionDataAttributes:
64033-
description: Attributes of a specific version of an Agent Observability prompt.
64096+
description: >-
64097+
Attributes of a specific version of an Agent Observability prompt. For a composed version, `authoring_template` contains its pinned include-bearing source; ordinary versions omit that attribute.
6403464098
properties:
6403564099
author:
6403664100
description: UUID of the user who authored this version.
6403764101
type: string
64102+
authoring_template:
64103+
$ref: "#/components/schemas/LLMObsPromptTemplate"
6403864104
created_at:
6403964105
description: Timestamp stored on this prompt version.
6404064106
format: date-time
@@ -173374,6 +173440,31 @@ paths:
173374173440
content:
173375173441
application/json:
173376173442
examples:
173443+
composed_chat:
173444+
summary: Create a version with whole-chat and selective pinned includes
173445+
value:
173446+
data:
173447+
attributes:
173448+
template:
173449+
messages:
173450+
- include:
173451+
prompt_id: "assistant-introduction"
173452+
version: 2
173453+
- include:
173454+
items: [2, 0, 0]
173455+
prompt_id: "response-examples"
173456+
version: 4
173457+
- content: "Answer {{question}}."
173458+
role: "user"
173459+
type: prompt-template-versions
173460+
composed_text:
173461+
summary: Create a version with an inline pinned include
173462+
value:
173463+
data:
173464+
attributes:
173465+
description: "Reuse the exact response policy."
173466+
template: "{{>response-policy version=3}}\n\nAnswer {{question}}."
173467+
type: prompt-template-versions
173377173468
default:
173378173469
value:
173379173470
data:
@@ -173394,6 +173485,50 @@ paths:
173394173485
content:
173395173486
application/json:
173396173487
examples:
173488+
composed_chat:
173489+
summary: A composed chat version preserves structured authored includes
173490+
value:
173491+
data:
173492+
attributes:
173493+
authoring_template:
173494+
messages:
173495+
- include:
173496+
prompt_id: "assistant-introduction"
173497+
version: 2
173498+
- include:
173499+
items: [2, 0, 0]
173500+
prompt_id: "response-examples"
173501+
version: 4
173502+
- content: "Answer {{question}}."
173503+
role: "user"
173504+
prompt_id: "support-chat"
173505+
prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb"
173506+
template:
173507+
- content: "You are a helpful assistant."
173508+
role: "system"
173509+
- content: "Here is one concise example."
173510+
role: "assistant"
173511+
- content: "You are a helpful assistant."
173512+
role: "system"
173513+
- content: "You are a helpful assistant."
173514+
role: "system"
173515+
- content: "Answer {{question}}."
173516+
role: "user"
173517+
version: 2
173518+
id: "d83ab666-61cc-5545-a83b-2424bb85467b"
173519+
type: prompt-template-versions
173520+
composed_text:
173521+
summary: A composed text version returns compiled and authored templates
173522+
value:
173523+
data:
173524+
attributes:
173525+
authoring_template: "{{>response-policy version=3}}\n\nAnswer {{question}}."
173526+
prompt_id: "support-answer"
173527+
prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb"
173528+
template: "Follow the approved response policy.\n\nAnswer {{question}}."
173529+
version: 2
173530+
id: "d83ab666-61cc-5545-a83b-2424bb85467b"
173531+
type: prompt-template-versions
173397173532
default:
173398173533
value:
173399173534
data:

‎src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ public LLMObsCreatePromptDataAttributes template(LLMObsPromptTemplate template)
180180
}
181181

182182
/**
183-
* A text template or a list of chat messages.
183+
* A text template, a list of chat messages, or an authored chat object. Text can include an exact
184+
* prompt version with <code>{{&gt;prompt-id version=N}}</code>. Use an authored chat object when
185+
* including prompts as chat messages.
184186
*
185187
* @return template
186188
*/

‎src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ public LLMObsCreatePromptVersionDataAttributes template(LLMObsPromptTemplate tem
151151
}
152152

153153
/**
154-
* A text template or a list of chat messages.
154+
* A text template, a list of chat messages, or an authored chat object. Text can include an exact
155+
* prompt version with <code>{{&gt;prompt-id version=N}}</code>. Use an authored chat object when
156+
* including prompts as chat messages.
155157
*
156158
* @return template
157159
*/
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
13+
import java.util.ArrayList;
14+
import java.util.HashMap;
15+
import java.util.List;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
19+
/** A chat prompt containing messages, pinned includes, or both. */
20+
@JsonPropertyOrder({})
21+
@jakarta.annotation.Generated(
22+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
23+
public class LLMObsPromptAuthoringChatTemplate extends ArrayList<LLMObsPromptAuthoringItem> {
24+
@JsonIgnore public boolean unparsed = false;
25+
26+
public LLMObsPromptAuthoringChatTemplate() {}
27+
28+
public LLMObsPromptAuthoringChatTemplate(List<LLMObsPromptAuthoringItem> items) {
29+
super(items);
30+
}
31+
32+
/**
33+
* A container for additional, undeclared properties. This is a holder for any undeclared
34+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
35+
*/
36+
private Map<String, Object> additionalProperties;
37+
38+
/**
39+
* Set the additional (undeclared) property with the specified name and value. If the property
40+
* does not already exist, create it otherwise replace it.
41+
*
42+
* @param key The arbitrary key to set
43+
* @param value The associated value
44+
* @return LLMObsPromptAuthoringChatTemplate
45+
*/
46+
@JsonAnySetter
47+
public LLMObsPromptAuthoringChatTemplate putAdditionalProperty(String key, Object value) {
48+
if (this.additionalProperties == null) {
49+
this.additionalProperties = new HashMap<String, Object>();
50+
}
51+
this.additionalProperties.put(key, value);
52+
return this;
53+
}
54+
55+
/**
56+
* Return the additional (undeclared) property.
57+
*
58+
* @return The additional properties
59+
*/
60+
@JsonAnyGetter
61+
public Map<String, Object> getAdditionalProperties() {
62+
return additionalProperties;
63+
}
64+
65+
/**
66+
* Return the additional (undeclared) property with the specified name.
67+
*
68+
* @param key The arbitrary key to get
69+
* @return The specific additional property for the given key
70+
*/
71+
public Object getAdditionalProperty(String key) {
72+
if (this.additionalProperties == null) {
73+
return null;
74+
}
75+
return this.additionalProperties.get(key);
76+
}
77+
78+
/** Return true if this LLMObsPromptAuthoringChatTemplate object is equal to o. */
79+
@Override
80+
public boolean equals(Object o) {
81+
if (this == o) {
82+
return true;
83+
}
84+
if (o == null || getClass() != o.getClass()) {
85+
return false;
86+
}
87+
return super.equals(o);
88+
}
89+
90+
@Override
91+
public int hashCode() {
92+
return Objects.hash(additionalProperties, super.hashCode());
93+
}
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class LLMObsPromptAuthoringChatTemplate {\n");
99+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
100+
sb.append(" additionalProperties: ")
101+
.append(toIndentedString(additionalProperties))
102+
.append("\n");
103+
sb.append('}');
104+
return sb.toString();
105+
}
106+
107+
/**
108+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
109+
*/
110+
private String toIndentedString(Object o) {
111+
if (o == null) {
112+
return "null";
113+
}
114+
return o.toString().replace("\n", "\n ");
115+
}
116+
}

0 commit comments

Comments
 (0)