类 Graph<N, RunInput, RunOutput, NodeSpecType>
属性
branches
branches: Record<string, Record<string, Branch<RunInput, N>>> 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
参数
- source: N
- path: ((input, config?) => string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>)
- (input, config?): string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>
参数
- input: RunInput
可选
config: RunnableConfig
返回值 string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>
可选
pathMap: Record<string, "__end__" | N> | ("__end__" | N)[]
返回 this
addEdge
- addEdge(startKey, endKey): this
参数
- startKey: "__start__" | N
- endKey: "__end__" | N
返回 this
compile
- compile(__namedParameters?): CompiledGraph<N, any, any>
参数
可选
__namedParameters: {
checkpointer?: BaseCheckpointSaver<number>;
interruptAfter?: "*" | N[];
interruptBefore?: "*" | N[];
}可选
interruptAfter?: "*" | N[]
可选
interruptBefore?: "*" | N[]
setEntryPoint
- setEntryPoint(key): this
返回 this
setFinishPoint
- setFinishPoint(key): this
返回 this
validate
- validate(interrupt?): void
返回值 void
受保护
warnIfCompiled
- warnIfCompiled(message): void
返回值 void
已弃用
请使用
addEdge(START, key)
代替