Skip to content

Commit cd9f91d

Browse files
feat(api): api update
1 parent 5561ef0 commit cd9f91d

4 files changed

Lines changed: 137 additions & 29 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 100
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-6adc3c6f2835d1b7b9ba4ac8681804a1649cda94d7e18b3ae8912cc96e135658.yml
3-
openapi_spec_hash: c1334572a6ff95b000905afbdd226b7a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-d7213471d760698138559c69aa0b518d82f8d2658a7e7d97242884a7ab985286.yml
3+
openapi_spec_hash: 01202f2767d9725492fec5aa90ae28d1
44
config_hash: d847cdf0b10e3d2ae194df8fed4ae22a

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

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,21 @@ private constructor(
4747
/**
4848
* Configuration for a `Runnable`.
4949
*
50-
* See the
51-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
52-
* for more details.
50+
* !!! note Custom values
51+
*
52+
* The `TypedDict` has `total=False` set intentionally to:
53+
* - Allow partial configs to be created and merged together via `merge_configs`
54+
* - Support config propagation from parent to child runnables via
55+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
56+
* config down the call stack without explicit parameter passing), where
57+
* configs are merged rather than replaced
58+
* !!! example
59+
* ```python
60+
* # Parent sets tags
61+
* chain.invoke(input, config={"tags": ["parent"]})
62+
* # Child automatically inherits and can add:
63+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
64+
* ```
5365
*
5466
* @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
5567
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -383,9 +395,21 @@ private constructor(
383395
/**
384396
* Configuration for a `Runnable`.
385397
*
386-
* See the
387-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
388-
* for more details.
398+
* !!! note Custom values
399+
*
400+
* The `TypedDict` has `total=False` set intentionally to:
401+
* - Allow partial configs to be created and merged together via `merge_configs`
402+
* - Support config propagation from parent to child runnables via
403+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
404+
* config down the call stack without explicit parameter passing), where
405+
* configs are merged rather than replaced
406+
* !!! example
407+
* ```python
408+
* # Parent sets tags
409+
* chain.invoke(input, config={"tags": ["parent"]})
410+
* # Child automatically inherits and can add:
411+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
412+
* ```
389413
*/
390414
fun options(options: RunnableConfig) = apply { body.options(options) }
391415

@@ -975,9 +999,21 @@ private constructor(
975999
/**
9761000
* Configuration for a `Runnable`.
9771001
*
978-
* See the
979-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
980-
* for more details.
1002+
* !!! note Custom values
1003+
*
1004+
* The `TypedDict` has `total=False` set intentionally to:
1005+
* - Allow partial configs to be created and merged together via `merge_configs`
1006+
* - Support config propagation from parent to child runnables via
1007+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
1008+
* config down the call stack without explicit parameter passing), where
1009+
* configs are merged rather than replaced
1010+
* !!! example
1011+
* ```python
1012+
* # Parent sets tags
1013+
* chain.invoke(input, config={"tags": ["parent"]})
1014+
* # Child automatically inherits and can add:
1015+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
1016+
* ```
9811017
*
9821018
* @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
9831019
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -1359,9 +1395,21 @@ private constructor(
13591395
/**
13601396
* Configuration for a `Runnable`.
13611397
*
1362-
* See the
1363-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
1364-
* for more details.
1398+
* !!! note Custom values
1399+
*
1400+
* The `TypedDict` has `total=False` set intentionally to:
1401+
* - Allow partial configs to be created and merged together via `merge_configs`
1402+
* - Support config propagation from parent to child runnables via
1403+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
1404+
* config down the call stack without explicit parameter passing), where
1405+
* configs are merged rather than replaced
1406+
* !!! example
1407+
* ```python
1408+
* # Parent sets tags
1409+
* chain.invoke(input, config={"tags": ["parent"]})
1410+
* # Child automatically inherits and can add:
1411+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
1412+
* ```
13651413
*/
13661414
fun options(options: RunnableConfig) = options(JsonField.of(options))
13671415

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

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,21 @@ private constructor(
4747
/**
4848
* Configuration for a `Runnable`.
4949
*
50-
* See the
51-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
52-
* for more details.
50+
* !!! note Custom values
51+
*
52+
* The `TypedDict` has `total=False` set intentionally to:
53+
* - Allow partial configs to be created and merged together via `merge_configs`
54+
* - Support config propagation from parent to child runnables via
55+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
56+
* config down the call stack without explicit parameter passing), where
57+
* configs are merged rather than replaced
58+
* !!! example
59+
* ```python
60+
* # Parent sets tags
61+
* chain.invoke(input, config={"tags": ["parent"]})
62+
* # Child automatically inherits and can add:
63+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
64+
* ```
5365
*
5466
* @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
5567
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -370,9 +382,21 @@ private constructor(
370382
/**
371383
* Configuration for a `Runnable`.
372384
*
373-
* See the
374-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
375-
* for more details.
385+
* !!! note Custom values
386+
*
387+
* The `TypedDict` has `total=False` set intentionally to:
388+
* - Allow partial configs to be created and merged together via `merge_configs`
389+
* - Support config propagation from parent to child runnables via
390+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
391+
* config down the call stack without explicit parameter passing), where
392+
* configs are merged rather than replaced
393+
* !!! example
394+
* ```python
395+
* # Parent sets tags
396+
* chain.invoke(input, config={"tags": ["parent"]})
397+
* # Child automatically inherits and can add:
398+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
399+
* ```
376400
*/
377401
fun options(options: RunnableConfig) = apply { body.options(options) }
378402

@@ -937,9 +961,21 @@ private constructor(
937961
/**
938962
* Configuration for a `Runnable`.
939963
*
940-
* See the
941-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
942-
* for more details.
964+
* !!! note Custom values
965+
*
966+
* The `TypedDict` has `total=False` set intentionally to:
967+
* - Allow partial configs to be created and merged together via `merge_configs`
968+
* - Support config propagation from parent to child runnables via
969+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
970+
* config down the call stack without explicit parameter passing), where
971+
* configs are merged rather than replaced
972+
* !!! example
973+
* ```python
974+
* # Parent sets tags
975+
* chain.invoke(input, config={"tags": ["parent"]})
976+
* # Child automatically inherits and can add:
977+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
978+
* ```
943979
*
944980
* @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
945981
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -1306,9 +1342,21 @@ private constructor(
13061342
/**
13071343
* Configuration for a `Runnable`.
13081344
*
1309-
* See the
1310-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
1311-
* for more details.
1345+
* !!! note Custom values
1346+
*
1347+
* The `TypedDict` has `total=False` set intentionally to:
1348+
* - Allow partial configs to be created and merged together via `merge_configs`
1349+
* - Support config propagation from parent to child runnables via
1350+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
1351+
* config down the call stack without explicit parameter passing), where
1352+
* configs are merged rather than replaced
1353+
* !!! example
1354+
* ```python
1355+
* # Parent sets tags
1356+
* chain.invoke(input, config={"tags": ["parent"]})
1357+
* # Child automatically inherits and can add:
1358+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
1359+
* ```
13121360
*/
13131361
fun options(options: RunnableConfig) = options(JsonField.of(options))
13141362

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,21 @@ import kotlin.jvm.optionals.getOrNull
3232
/**
3333
* Configuration for a `Runnable`.
3434
*
35-
* See the
36-
* [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
37-
* for more details.
35+
* !!! note Custom values
36+
*
37+
* The `TypedDict` has `total=False` set intentionally to:
38+
* - Allow partial configs to be created and merged together via `merge_configs`
39+
* - Support config propagation from parent to child runnables via
40+
* `var_child_runnable_config` (a `ContextVar` that automatically passes
41+
* config down the call stack without explicit parameter passing), where
42+
* configs are merged rather than replaced
43+
* !!! example
44+
* ```python
45+
* # Parent sets tags
46+
* chain.invoke(input, config={"tags": ["parent"]})
47+
* # Child automatically inherits and can add:
48+
* # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
49+
* ```
3850
*/
3951
class RunnableConfig
4052
@JsonCreator(mode = JsonCreator.Mode.DISABLED)

0 commit comments

Comments
 (0)