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

Add content outside of the response textbox #25

Closed marklysze closed 3 weeks ago

marklysze commented 5 months ago

Is it possible to add extra elements around the response box?

For me specifically, boxes for each of the sources that I'm getting back in my response would be great to present to the user.

As an example, LangChain's chatbot (chat.langchain.com) shows the sources in a response as separate boxes at the top of the response text, and these can be clicked on to access the source webpages.

I am planning to concatenate the sources to LangChain's response, e.g.: "... response from LLM ... ["Source 1", "Document Name and link"] ["Source 2", "Document Name and link"] "

I can put these as links in the response text, though it would be nice to be able to beautify these boxes with things like thumbnails, titles, and text.

marklysze commented 4 months ago

Just to add to this, happy to have the content in the box itself (I could put it in the box after the text

salmenus commented 1 month ago

@marklysze โ€”ย this is now possible thanks to Custom Response Renderers

Example here: https://docs.nlkit.com/nlux/examples/custom-response-renderers

I hope this matches the feature request. If so, I'll go ahead and close this issue.