MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / ExecutionNode

Class ExecutionNode

toolbench/tooleval/evaluation/dataclass.py:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 return str(uuid.uuid4())
38
39class ExecutionNode(BaseModel):
40 node_id:GID = Field(default_factory=assign_gid)
41 role: Optional[Any] = None # System, User, Assistant, Tool
42 message: Optional[Any] = None
43 in_degree:int = 0
44 out_degree:int = 0
45
46 def __eq__(self, other) -> bool:
47 if isinstance(other,ExecutionNode):
48 return self.node_id == other.node_id
49 raise NotImplementedError('Unsupported operation between {} and {}'.format(type(self),type(other)))
50
51 def __str__(self) -> str:
52 return str(self.node_id)
53
54
55class DirectedEdge(BaseModel):

Callers 8

process_valid_dataFunction · 0.90
process_invalid_dataFunction · 0.90
DFSFunction · 0.90
process_valid_dataFunction · 0.90
process_invalid_dataFunction · 0.90
DFSFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected