mirror of
https://github.com/langgenius/dify.git
synced 2026-05-30 16:00:32 -04:00
feat: extract model runtime
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
@@ -10,7 +10,6 @@ from pydantic import TypeAdapter
|
||||
from dify_graph.entities.graph_config import NodeConfigDict
|
||||
from dify_graph.enums import ErrorStrategy, NodeExecutionType, NodeState
|
||||
from dify_graph.nodes.base.node import Node
|
||||
from libs.typing import is_str
|
||||
|
||||
from .edge import Edge
|
||||
from .validation import get_graph_validator
|
||||
@@ -102,7 +101,7 @@ class Graph:
|
||||
source = edge_config.get("source")
|
||||
target = edge_config.get("target")
|
||||
|
||||
if not is_str(source) or not is_str(target):
|
||||
if not isinstance(source, str) or not isinstance(target, str):
|
||||
continue
|
||||
|
||||
# Create edge
|
||||
@@ -110,7 +109,7 @@ class Graph:
|
||||
edge_counter += 1
|
||||
|
||||
source_handle = edge_config.get("sourceHandle", "source")
|
||||
if not is_str(source_handle):
|
||||
if not isinstance(source_handle, str):
|
||||
continue
|
||||
|
||||
edge = Edge(
|
||||
|
||||
Reference in New Issue
Block a user