langchain_core.runnables.graph
.Branch¶
- class langchain_core.runnables.graph.Branch(condition: Callable[..., str], ends: Optional[dict[str, str]])[source]¶
图ä¸çš„分支。
Create new instance of Branch(condition, ends)
Attributes
condition
Alias for field number 0
ends
Alias for field number 1
Methods
__init__
()count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
- Parameters
condition (Callable[[...], str]) –
ends (Optional[dict[str, str]]) –
- __init__()¶
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.