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

Class EnumOption

entity/configs/base.py:62–75  ·  view source on GitHub ↗

Rich metadata for enum values shown in UI.

Source from the content-addressed store, hash-verified

60
61@dataclass(frozen=True)
62class EnumOption:
63 """Rich metadata for enum values shown in UI."""
64
65 value: Any
66 label: str | None = None
67 description: str | None = None
68
69 def to_json(self) -> Dict[str, Any]:
70 payload: Dict[str, Any] = {"value": self.value}
71 if self.label:
72 payload["label"] = self.label
73 if self.description:
74 payload["description"] = self.description
75 return payload
76
77
78@dataclass(frozen=True)

Callers 8

enum_options_forFunction · 0.90
enum_options_from_valuesFunction · 0.90
field_specsMethod · 0.90
field_specsMethod · 0.90
field_specsMethod · 0.90
LiteralNodeConfigClass · 0.90
_apply_provider_enumMethod · 0.90
LoopTimerConfigClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected