Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum renders kind of weird #1377

Open
kevinbird15 opened this issue Oct 26, 2023 · 1 comment
Open

Enum renders kind of weird #1377

kevinbird15 opened this issue Oct 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kevinbird15
Copy link
Contributor

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 kevinbird15 added the bug Something isn't working label Oct 26, 2023
@kevinbird15
Copy link
Contributor Author

kevinbird15 commented Oct 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant