Class Graph<N, RunInput, RunOutput, NodeSpecType, C>
Properties
branches
branches: Record<string, Record<string, Branch<RunInput, N, any>>> compiled
compiled: boolean
edges
edges: Set<["__start__" | N, "__end__" | N]> Optional
entryPoint
entryPoint?: string
nodes
Accessors
allEdges
- get allEdges(): Set<[string, string]>
Returns Set<[string, string]>
Methods
addConditionalEdges
- addConditionalEdges(source): this
Returns this
- addConditionalEdges(source, path, pathMap?): this
Returns this
addEdge
- addEdge(startKey, endKey): this
Parameters
- startKey: "__start__" | N
- endKey: "__end__" | N
Returns this
compile
- compile(__namedParameters?): CompiledGraph<N, any, any, Record<string, any>, any, any>
Parameters
Optional
__namedParameters: {
checkpointer?: false | BaseCheckpointSaver<number>;
interruptAfter?: "*" | N[];
interruptBefore?: "*" | N[];
}Optional
checkpointer?: false | BaseCheckpointSaver<number>
Optional
interruptAfter?: "*" | N[]
Optional
interruptBefore?: "*" | N[]
Returns CompiledGraph<N, any, any, Record<string, any>, any, any>
setEntryPoint
- setEntryPoint(key): this
Returns this
setFinishPoint
- setFinishPoint(key): this
Returns this
validate
- validate(interrupt?): void
Parameters
Optional
interrupt: string[]
Returns void
Protected
warnIfCompiled
- warnIfCompiled(message): void
Returns void
Deprecated
use
addEdge(START, key)
instead