AnswerDotAI / AnswerDotAI/MonsterUI

MonsterUI LLMs Text

Open
#57 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
522
Forks
33
Avg merge
1m
Merged PRs (30d)
1

Description

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

```python
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.