类 Graph<N, RunInput, RunOutput, NodeSpecType, C>
属性
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
访问器
allEdges
- get allEdges(): Set<[string, string]>
返回值 Set<[string, string]>
方法
addConditionalEdges
- addConditionalEdges(source): this
返回值 this
- addConditionalEdges(source, path, pathMap?): this
返回值 this
addEdge
- addEdge(startKey, endKey): this
参数
- startKey: "__start__" | N
- endKey: "__end__" | N
返回值 this
compile
- compile(__namedParameters?): CompiledGraph<N, any, any, Record<string, any>, any, any>
参数
Optional
__namedParameters: {
checkpointer?: false | BaseCheckpointSaver<number>;
interruptAfter?: "*" | N[];
interruptBefore?: "*" | N[];
name?: string;
}Optional
checkpointer?: false | BaseCheckpointSaver<number>
Optional
interruptAfter?: "*" | N[]
Optional
interruptBefore?: "*" | N[]
Optional
name?: string
返回值 CompiledGraph<N, any, any, Record<string, any>, any, any>
setEntryPoint
- setEntryPoint(key): this
返回值 this
setFinishPoint
- setFinishPoint(key): this
返回值 this
validate
- validate(interrupt?): void
参数
Optional
interrupt: string[]
返回值 void
Protected
warnIfCompiled
- warnIfCompiled(message): void
返回值 void
已弃用
请使用
addEdge(START, key)
代替