refactor: decouple Node and NodeData (#22581)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
This commit is contained in:
parent
54c56f2d05
commit
460a825ef1
65 changed files with 2305 additions and 1146 deletions
|
|
@ -50,13 +50,15 @@ def init_tool_node(config: dict):
|
|||
conversation_variables=[],
|
||||
)
|
||||
|
||||
return ToolNode(
|
||||
node = ToolNode(
|
||||
id=str(uuid.uuid4()),
|
||||
graph_init_params=init_params,
|
||||
graph=graph,
|
||||
graph_runtime_state=GraphRuntimeState(variable_pool=variable_pool, start_at=time.perf_counter()),
|
||||
config=config,
|
||||
)
|
||||
node.init_node_data(config.get("data", {}))
|
||||
return node
|
||||
|
||||
|
||||
def test_tool_variable_invoke():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue