This PR also features an API change - added a feedback event:
/** Create a chatbot card to allow getting prompts from users and providing them with LLM generated answers. */
export interface Chatbot {
/** An identifying name for this component. */
name: Id
/** Chat messages data. Requires list or cyclic buffer. */
data: Rec
/** Chat input box placeholder. Use for prompt examples. */
placeholder?: S
/** The events to capture on this chatbot. One of 'stop' | 'scroll_up' | 'feedback'. */
events?: S[]
/** True to show a button to stop the text generation. Defaults to False. */
generating?: B
/** The previous messages to show as the user scrolls up. */
prev_items?: ChatbotMessage[]
}
The PR fulfills these requirements: (check all the apply)
main
branch.feat: Add a button #xxx
, where "xxx" is the issue number).Closes #xxx
, where "xxx" is the issue number.ui
folder, unit tests (make test
) still pass.Usage example:
https://github.com/h2oai/wave/assets/23740173/1ff4870e-73f5-4d82-b053-384a0cb4ab0f
This PR also features an API change - added a
feedback
event:Closes #2165