nbdev icon indicating copy to clipboard operation
nbdev copied to clipboard

Enum renders kind of weird

Open kevinbird15 opened this issue 2 years ago • 1 comments
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: image

kevinbird15 avatar Oct 26 '23 05:10 kevinbird15

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

kevinbird15 avatar Oct 26 '23 05:10 kevinbird15