MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / from_definition

Method from_definition

entity/graph_config.py:43–60  ·  view source on GitHub ↗
(
        cls,
        definition: GraphDefinition,
        name: str,
        output_root: Path | str,
        *,
        source_path: str | None = None,
        vars: Dict[str, Any] | None = None,
    )

Source from the content-addressed store, hash-verified

41
42 @classmethod
43 def from_definition(
44 cls,
45 definition: GraphDefinition,
46 name: str,
47 output_root: Path | str,
48 *,
49 source_path: str | None = None,
50 vars: Dict[str, Any] | None = None,
51 ) -> "GraphConfig":
52 return cls(
53 definition=definition,
54 name=name,
55 output_root=Path(output_root) if output_root else Path("WareHouse"),
56 log_level=definition.log_level,
57 metadata={},
58 source_path=source_path,
59 vars=dict(vars or {}),
60 )
61
62 def get_node_definitions(self) -> List[Node]:
63 return self.definition.nodes

Callers 5

mainFunction · 0.80
_run_single_taskMethod · 0.80
run_workflowFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected