@@ -85,16 +85,6 @@ def join(
85
85
86
86
Returns:
87
87
Either a Join instance or a decorator function
88
-
89
- Example:
90
- ```python
91
- # As a decorator
92
- @join(node_id="collect_results")
93
- class MyReducer(ListReducer[str]): ...
94
-
95
- # Or called directly
96
- my_join = join(ListReducer, node_id="collect_results")
97
- ```
98
88
"""
99
89
if reducer_type is None :
100
90
@@ -127,20 +117,6 @@ class GraphBuilder(Generic[StateT, DepsT, GraphInputT, GraphOutputT]):
127
117
DepsT: The type of the dependencies
128
118
GraphInputT: The type of the graph input data
129
119
GraphOutputT: The type of the graph output data
130
-
131
- Example:
132
- ```python
133
- builder = GraphBuilder[MyState, MyDeps, str, int]()
134
-
135
- @builder.step
136
- async def process_data(ctx: StepContext[MyState, MyDeps, str]) -> int:
137
- return len(ctx.inputs)
138
-
139
- builder.add_edge(builder.start_node, process_data)
140
- builder.add_edge(process_data, builder.end_node)
141
-
142
- graph = builder.build()
143
- ```
144
120
"""
145
121
146
122
name : str | None
@@ -318,17 +294,6 @@ def step(
318
294
319
295
Returns:
320
296
Either a Step instance or a decorator function
321
-
322
- Example:
323
- ```python
324
- # As a decorator
325
- @builder.step(node_id="process", label="Process Data")
326
- async def process_data(ctx: StepContext[MyState, MyDeps, str]) -> int:
327
- return len(ctx.inputs)
328
-
329
- # Or called directly
330
- step = builder.step(process_data, node_id="process")
331
- ```
332
297
"""
333
298
if call is None :
334
299
return self ._step (node_id = node_id , label = label )
@@ -368,12 +333,6 @@ def join(
368
333
369
334
Returns:
370
335
Either a Join instance or a decorator function
371
-
372
- Example:
373
- ```python
374
- # Create a join that collects results into a list
375
- collect_join = builder.join(ListReducer, node_id="collect_results")
376
- ```
377
336
"""
378
337
if reducer_factory is None :
379
338
return join (node_id = node_id )
0 commit comments