nlkitai / nlux

The π—£π—Όπ˜„π—²π—Ώπ—³π˜‚π—Ή Conversational AI JavaScript Library πŸ’¬ β€”Β UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 🧑 React, Next.js, and plain JavaScript ⭐️
https://docs.nlkit.com/nlux
Other
943 stars 48 forks source link

Is it possible to have the Markdown Streaming Parser separated as a library? #9

Closed gunta closed 4 months ago

gunta commented 5 months ago

We found it very valuable to be used standalone.

Do you think making it a library inside this monorepo would work? Currently we have to copy and paste the code for this part only, which is far from ideal.

Thanks!

salmenus commented 5 months ago

Hi @gunta ― Great idea. Definitely doable and it's quick one to deliver. We can keep it in the mono-repo and publish it as a separate NPM package ..

I added this issue to the project board I'll aim to have it ready early next week ..

gunta commented 5 months ago

Hi @salmenus! Thanks in advance!

By the way, any ETA ? I believe @nlux/markdown could be the foundation to some pretty amazing user interactions.

I already have some ideas for enriching Markdown Streaming support to the next level.

  1. For example, since Markdown supports tables, we could have a novel optional AG Grid integration that not only shows the table data in a realtime streaming way, but also supports sorting and filtering.

  2. Or for instance, we could also support GitHub new markdown's alert syntax.

  3. Or support also MDX and stream components inside markdown.

There is so much opportunity to enrich the experience of streaming and I think NLUX is ahead of any other OSS library.

On a broader level, I wonder if there could be any sort of blending with the amazing Partial Stream, not only for markdown but for other data for the UI such as JSON.

What do you think?

salmenus commented 5 months ago

Hi @gunta - some good news:

Def. I like your suggestions about enriching the markdown parser πŸ‘ I thought about similar ideas idea, especially for extended syntax and components.

Regarding integration with other libs: Definitely, we can add those that make senses and required by other developers. We already have highlight.js integration for syntax highlighter through @nlux/highlighter. We can do more like that.

Do you want to contribute ? Did you manage run the unit tests ? If it's a blocker for you, I can dedicate time to fix U.T on Ubuntu so you can contribute.

gunta commented 5 months ago

Thank you so much!

I'll try it and let you know how it goes.

Do you want to contribute ? Did you manage run the unit tests ? Definitely want to, but right now got a product release coming soon. So it will have to be in the future. Unless there is some urgent functionality that overlaps and is needed in the product I'm currently building at work.