holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.42k stars 484 forks source link

Roadmap for chat components #6291

Open ahuang11 opened 5 months ago

ahuang11 commented 5 months ago

Highest priority:

  1. Integrate a custom ChatInput https://github.com/holoviz/panel/issues/6115

  2. Make it possible to customize styling of chat components https://github.com/holoviz/panel/issues/6235

  3. Migrate and integrate Status component that streams agents' intermediate steps or context from RAG (better naming, like CardUpdates TBD?)

Nice to haves:

  1. Ability to edit sent messages and rerun (and maybe deprecate the undo/rerun buttons)

    image
  2. ChatSuggestion buttons (a list of suggestions to input)

    image
  3. Improved control over placeholder (right now it's not-configurable and disappears upon stream)

  4. Default Help user for instructions for user, and gets ignored upon instance.serialize https://github.com/holoviz/panel/issues/5984

  5. Built-in export chat history button https://github.com/holoviz/panel/issues/5567

  6. Custom callback exception handlers https://github.com/holoviz/panel/issues/6047

MarcSkovMadsen commented 5 months ago

Notes

2 in 1 Fileupload + input

2 in 1 Fileupload + input is something we lack in general not only for text. But for tables, images,video,Audio and maybe more. Gradio provides components like that which makes model testing apps easy to create for their users.

You can also think about it as drag and drop support. For non-chat use cases having a DragAndDropArea you could place a pane or (Tabulator) widget inside for display would be awesome.

ChatSuggestions

ChatSuggestions can also be generalized to a general ExamplesInput. Again Gradio provides something like that which makes it super easy to pick example texts, images, audio or videos.

ahuang11 commented 5 months ago

For non-chat use cases having a DragAndDropArea you could place a pane or (Tabulator) widget inside for display would be awesome.

I can't wrap my head around this. Can you elaborate?

ChatSuggestions

Actually I'm not sure if it should be a component, or just a param of ChatFeed. What would this component add beyond being a button if it's not linked to anything?

MarcSkovMadsen commented 5 months ago

For non-chat use cases having a DragAndDropArea you could place a pane or (Tabulator) widget inside for display would be awesome.

I can't wrap my head around this. Can you elaborate?

Yes. DragAndDropArea is a layout that takes a pane or widget as input. It understand what types of objects the given pane or widget can accept. When something valid is drag and dropped in its area its converted into something the pane or object can take as input.

DragAndDropArea(Image("some_image.png"))

If you drag an image into the above area it replaces "some_image.png" in the Image pane.

ahuang11 commented 5 months ago

Sounds awesome!

MarcSkovMadsen commented 5 months ago

ChatSuggestions

Actually I'm not sure if it should be a component, or just a param of ChatFeed. What would this component add beyond being a button if it's not linked to anything?

Composability. It would be a lego brick that could be used with the ChatFeed. But also just with any widget that takes text as argument. Gradio often have apps with a TextInput that the user can click some examples to quickly test things out.

ahuang11 commented 5 months ago

Can you sketch out a param class for it? I still can't wrap my head around its benefit over using vanilla pn.widgets.Button.