Skip to content

Commit 79f436a

Browse files
docs: add comment for arbitrary value fields
1 parent 60e0ce8 commit 79f436a

5 files changed

Lines changed: 72 additions & 1 deletion

File tree

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/commits/CommitCreateParams.kt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ private constructor(
3636

3737
fun repo(): Optional<JsonValue> = Optional.ofNullable(repo)
3838

39+
/**
40+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
41+
* ```java
42+
* MyClass myObject = commitCreateParams.manifest().convert(MyClass.class);
43+
* ```
44+
*/
3945
fun _manifest(): JsonValue = body._manifest()
4046

4147
/**
@@ -47,6 +53,11 @@ private constructor(
4753
/**
4854
* SkipWebhooks allows skipping webhook notifications. Can be true (boolean) to skip all, or an
4955
* array of webhook UUIDs to skip specific ones.
56+
*
57+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
58+
* ```java
59+
* MyClass myObject = commitCreateParams.skipWebhooks().convert(MyClass.class);
60+
* ```
5061
*/
5162
fun _skipWebhooks(): JsonValue = body._skipWebhooks()
5263

@@ -309,6 +320,12 @@ private constructor(
309320
skipWebhooks: JsonValue = JsonMissing.of(),
310321
) : this(manifest, parentCommit, skipWebhooks, mutableMapOf())
311322

323+
/**
324+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
325+
* ```java
326+
* MyClass myObject = body.manifest().convert(MyClass.class);
327+
* ```
328+
*/
312329
@JsonProperty("manifest") @ExcludeMissing fun _manifest(): JsonValue = manifest
313330

314331
/**
@@ -320,6 +337,11 @@ private constructor(
320337
/**
321338
* SkipWebhooks allows skipping webhook notifications. Can be true (boolean) to skip all, or
322339
* an array of webhook UUIDs to skip specific ones.
340+
*
341+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
342+
* ```java
343+
* MyClass myObject = body.skipWebhooks().convert(MyClass.class);
344+
* ```
323345
*/
324346
@JsonProperty("skip_webhooks") @ExcludeMissing fun _skipWebhooks(): JsonValue = skipWebhooks
325347

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/commits/CommitRetrieveResponse.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ private constructor(
5050
*/
5151
fun examples(): Optional<List<Example>> = examples.getOptional("examples")
5252

53+
/**
54+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
55+
* ```java
56+
* MyClass myObject = commitRetrieveResponse.manifest().convert(MyClass.class);
57+
* ```
58+
*/
5359
@JsonProperty("manifest") @ExcludeMissing fun _manifest(): JsonValue = manifest
5460

5561
/**
@@ -231,8 +237,20 @@ private constructor(
231237
*/
232238
fun id(): Optional<String> = id.getOptional("id")
233239

240+
/**
241+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
242+
* ```java
243+
* MyClass myObject = example.inputs().convert(MyClass.class);
244+
* ```
245+
*/
234246
@JsonProperty("inputs") @ExcludeMissing fun _inputs(): JsonValue = inputs
235247

248+
/**
249+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
250+
* ```java
251+
* MyClass myObject = example.outputs().convert(MyClass.class);
252+
* ```
253+
*/
236254
@JsonProperty("outputs") @ExcludeMissing fun _outputs(): JsonValue = outputs
237255

238256
/**

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/commits/CommitWithLookups.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ private constructor(
124124
*/
125125
fun fullName(): Optional<String> = fullName.getOptional("full_name")
126126

127-
/** The manifest of the commit */
127+
/**
128+
* The manifest of the commit
129+
*
130+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
131+
* ```java
132+
* MyClass myObject = commitWithLookups.manifest().convert(MyClass.class);
133+
* ```
134+
*/
128135
@JsonProperty("manifest") @ExcludeMissing fun _manifest(): JsonValue = manifest
129136

130137
/**

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/playgroundexperiment/PlaygroundExperimentBatchParams.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ private constructor(
3636
*/
3737
fun datasetId(): String = body.datasetId()
3838

39+
/**
40+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
41+
* ```java
42+
* MyClass myObject = playgroundExperimentBatchParams.manifest().convert(MyClass.class);
43+
* ```
44+
*/
3945
fun _manifest(): JsonValue = body._manifest()
4046

4147
/**
@@ -958,6 +964,12 @@ private constructor(
958964
*/
959965
fun datasetId(): String = datasetId.getRequired("dataset_id")
960966

967+
/**
968+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
969+
* ```java
970+
* MyClass myObject = body.manifest().convert(MyClass.class);
971+
* ```
972+
*/
961973
@JsonProperty("manifest") @ExcludeMissing fun _manifest(): JsonValue = manifest
962974

963975
/**

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/playgroundexperiment/PlaygroundExperimentStreamParams.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ private constructor(
3636
*/
3737
fun datasetId(): String = body.datasetId()
3838

39+
/**
40+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
41+
* ```java
42+
* MyClass myObject = playgroundExperimentStreamParams.manifest().convert(MyClass.class);
43+
* ```
44+
*/
3945
fun _manifest(): JsonValue = body._manifest()
4046

4147
/**
@@ -920,6 +926,12 @@ private constructor(
920926
*/
921927
fun datasetId(): String = datasetId.getRequired("dataset_id")
922928

929+
/**
930+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
931+
* ```java
932+
* MyClass myObject = body.manifest().convert(MyClass.class);
933+
* ```
934+
*/
923935
@JsonProperty("manifest") @ExcludeMissing fun _manifest(): JsonValue = manifest
924936

925937
/**

0 commit comments

Comments
 (0)