类 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]> 可选
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>
参数
可选
__namedParameters: {
checkpointer?: false | BaseCheckpointSaver<number>;
interruptAfter?: "*" | N[];
interruptBefore?: "*" | N[];
name?: string;
}可选
interruptAfter?: "*" | N[]
可选
interruptBefore?: "*" | N[]
可选
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
返回 void
保护
warnIfCompiled
- warnIfCompiled(message): void
返回 void
已弃用
请改用
addEdge(START, key)