nbdev
nbdev copied to clipboard
Enum renders kind of weird
trafficstars
Provide a minimally reproducible example
#| export
from enum import Enum
#| export
class Role(Enum):
SYSTEM = "system"
USER = "user"
ASSISTANT = "assistant"
FUNCTION = "function"
creates the following doc:
The first question here is what should an Enum like this look like in the docs? I think even just showing the mappings would be a good starting point. So
Role
System = "system" USER = "user" ASSISTANT = "assistant" FUNCTION = "function"
Maybe a comment down here?
Definitely interested to hear other ideas of what format would be useful/expected in this case though as well