oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Placeholder - 'Print Chat' support

cyberfox opened this issue · comments

Description

As a proud and excited TGW user and developer, I often want to share my conversational and technical chat logs with other people. The design of the system does not support exporting it as HTML, or even markdown, so sharing the logs with other users is difficult. Optimally it would be exportable or displayed in a format that is easily printable, preferably HTML with a @media print CSS block.

I envision this as a button next to 'New Chat' which offers a 'Print Chat' button. This would use the internal visibility model of the conversation so far and Markdown to generate a single document containing the entire conversation so far, using as much of the existing CSS and styling as possible. It would include a @media print block which would make printing it (to PDF or to a printer) easy. My initial goal is to make printing to PDF high quality, as I think sharing is more common than printing to dead trees. 😄

If this can be implemented as an extension, that will be my preferred approach, since most of the information should be available to the extension model.

Additional Context

This is a placeholder feature request, mostly because I intend to build some version of this, and am not asking for it to be built for me. Any help would be gratefully appreciated, of course.

I hope it's okay for me to use this space as a stand-in; I would like to track the feature on TGW, even if it ultimately ends up being mostly an extension. Initially my intention is to make it an extension, but it may require deeper integration touches to the whole of TGW to make it work.

Prior work

I have built an 'offline' version of this; a Python script that takes a logs/{character}/{timestamp}.log file and creates an HTML version, that can be printed or saved as PDF. It uses fixed, personally constructed styling that roughly matches my UI, but lacks some of the advanced styling that TGW offers. It's difficult to use because the log files don't contain any metadata like usernames or profile picture links, so all of that has to be passed to the tool.

I would like to enhance the log file system with some of that information, but that's a stretch goal, and would likely consist of optional metadata files living side-by-side with the log files. But still the UI configuration would not be reflected, because that's very dynamic. Being built into TGW would make it much easier to use existing styling so the transcript looks more like the actual interaction.