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

MonsterUI LLMs Text #57

Open
Isaac-Flath opened this issue Feb 7, 2025 · 0 comments
Open

MonsterUI LLMs Text #57

Isaac-Flath opened this issue Feb 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Isaac-Flath
Copy link
Collaborator

This involves making them great. Some problems are the documentation shows examples that don't translate to markdown at all! Sometimes text transfers from them which makes it even worse. So figuring out how to generate great markdown files for these would be great. Once the basics are done this can go as far as we want on trying things out (ie auto screenshotting generated content examples to embed into LLMs.txt!?!)

API Reference pages are created in this function

def render_content(c):
    "Renders content by type"
    if isinstance(c, str):        return render_md(c) # Strings are rendered as markdown
    elif isinstance(c, EnumType): return enum_to_html_table(c) # Enums are rendered as tables
    elif isinstance(c, FT):       return c # FastHTML tags are rendered as themselves
    elif isinstance(c, tuple): # Tuples are rendered as cards with source and output that can be flipped
        extra_cls = c[2] if len(tuple(c)) == 3 else None
        return create_flippable_card(c[0], c[1], extra_cls)
    elif isinstance(c, Callable): # Callables are rendered as documentation via show_doc
        return show_doc(c)
    else: return c

I suspect the right approach is to make a function like this for generating the markdown by having different types of things write different text, rather than trying to auto-convert after the fact.

@Isaac-Flath Isaac-Flath added the enhancement New feature or request label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant