This commit is contained in:
William Fu-Hinthorn
2025-02-25 11:58:01 -08:00
parent f679348327
commit b5a981d82d
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ function getBranchView<StateType extends Record<string, unknown>>(
branchByCheckpoint[item.value.checkpoint.checkpoint_id!] = {
branch: item.path.join(PATH_SEP),
branchOptions: (item.path.length > 0
? pathMap[item.path.at(-2) ?? ROOT_ID] ?? []
? (pathMap[item.path.at(-2) ?? ROOT_ID] ?? [])
: []
).map((p) => p.join(PATH_SEP)),
};
+8 -4
View File
@@ -1834,7 +1834,7 @@ class RunsClient:
run_id: str,
*,
cancel_on_disconnect: bool = False,
stream_mode: Union[StreamMode, Sequence[StreamMode]] = "values",
stream_mode: Optional[Union[StreamMode, Sequence[StreamMode]]] = None,
) -> AsyncIterator[StreamPart]:
"""Stream output from a run in real-time, until the run is done.
Output is not buffered, so any output produced before this call will
@@ -1844,7 +1844,9 @@ class RunsClient:
thread_id: The thread ID to join.
run_id: The run ID to join.
cancel_on_disconnect: Whether to cancel the run when the stream is disconnected.
stream_mode: The stream mode(s) to use.
stream_mode: The stream mode(s) to use. Must be a subset of the stream modes passed
when creating the run. Background runs default to having the union of all
stream modes.
Returns:
None
@@ -3981,7 +3983,7 @@ class SyncRunsClient:
thread_id: str,
run_id: str,
*,
stream_mode: Union[StreamMode, Sequence[StreamMode]] = "values",
stream_mode: Optional[Union[StreamMode, Sequence[StreamMode]]] = None,
cancel_on_disconnect: bool = False,
) -> Iterator[StreamPart]:
"""Stream output from a run in real-time, until the run is done.
@@ -3991,7 +3993,9 @@ class SyncRunsClient:
Args:
thread_id: The thread ID to join.
run_id: The run ID to join.
stream_mode: The stream mode(s) to use.
stream_mode: The stream mode(s) to use. Must be a subset of the stream modes passed
when creating the run. Background runs default to having the union of all
stream modes.
cancel_on_disconnect: Whether to cancel the run when the stream is disconnected.
Returns: