INNER CODE UNIT · Python

load_yaml

lishuangqiang/AI-Meeting · skills/xunzhi-interview-domain/scripts/extract_workflow_contracts.py:13

def load_yaml(path: Path) -> dict[str, Any]:
    with path.open("r", encoding="utf-8") as fp:
        loaded = yaml.safe_load(fp)
    return loaded or {}


def find_start_node(nodes: list[dict[str, Any]]) -> dict[str, Any] | None:
    for node in nodes:
        if str(node.get("type", "")).startswith("开始"):
            return node
    return nodes[0] if nodes else None


def format_types(output_item: dict[str, Any]) -> str:
    schema = output_item.get("schema") or {}
    data_type = schema.get("type") or "unknown"
    file_type = output_item.get("fileType") or output_item.get("customParameterType")
    allowed = output_item.get("allowedFileType") or []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…