-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feedback knoweldege base with thumbsUp/thumbsDown #2859
Merged
Iru89
merged 8 commits into
master-lts
from
feature/blt-630-i-want-to-be-able-to-provide-feedback-for-each-response
Jul 9, 2024
Merged
feedback knoweldege base with thumbsUp/thumbsDown #2859
Iru89
merged 8 commits into
master-lts
from
feature/blt-630-i-want-to-be-able-to-provide-feedback-for-each-response
Jul 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iru89
changed the title
WIP
plugin-flow-builder: feedback message for message generated with knowledge base
Jun 19, 2024
Iru89
force-pushed
the
feature/blt-630-i-want-to-be-able-to-provide-feedback-for-each-response
branch
4 times, most recently
from
June 21, 2024 11:40
1e42658
to
44fbd25
Compare
Iru89
changed the title
plugin-flow-builder: feedback message for message generated with knowledge base
plugin-flow-builder: feedback knoweldege base with thumbsUp/thumbsDown
Jun 21, 2024
Iru89
changed the title
plugin-flow-builder: feedback knoweldege base with thumbsUp/thumbsDown
feedback knoweldege base with thumbsUp/thumbsDown
Jun 21, 2024
vanbasten17
approved these changes
Jun 23, 2024
packages/botonic-plugin-flow-builder/src/content-fields/flow-knowledge-base.tsx
Show resolved
Hide resolved
packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-feedback-knowledgebase.ts
Outdated
Show resolved
Hide resolved
packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-feedback-knowledgebase.ts
Outdated
Show resolved
Hide resolved
… and thumbsDown in the footer of the message
…g the webchat object defined in the bot
Iru89
force-pushed
the
feature/blt-630-i-want-to-be-able-to-provide-feedback-for-each-response
branch
from
July 1, 2024 13:04
44fbd25
to
8d90eb7
Compare
…ode to enable/disable feedback in knowledge base messages
…and feedbackEnabled attributes
…pId are required in backend
Iru89
deleted the
feature/blt-630-i-want-to-be-able-to-provide-feedback-for-each-response
branch
July 9, 2024 14:43
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add feedback_knowledgebase event
Be able to add ThumbsUp and ThumbsDown buttons to give feedback on webchat messages.
When the flow builder creates a message using the knowledge base Uses the Text component with new withfeedback and inferenceid attributes
The withfeedback and inferenceid attributes cannot be declared using camelCase because when they pass through the backen they come back with everything in lowercase, it doesn't work with snake_case either. I'm not sure but I think it's because of the html parser, the attributes have to be single words or use kebab-case.
Context
Review this PR commit by commit:
plugin-hubtype-analytics: add feedback_knowledgebase event
botonic-react: Refactor the FooterMessage and add the FeedbackMessage which contains the ThumbsUp ThumbsDown buttons and uses the trackEvent function when clicked.
botonic-react: Add the possibility to inject the onTrackEvent function from the bot to the webchat to create events from the frontend. Just like we already have the onInit, onOpen, onClose, onMessage functions.
plugin-flow-builder: When the flow builder plugin uses the knowledge base to generate a message it creates a @botonic/react Text with the new withfeedback and inferenceid attributes needed for tracking.
The other commits are a refactor that renumbers the with_feedback attrbute to feebackEnabled using camelCase
Approach taken / Explain the design
Design
To document / Usage example
How to pass the tracking function from bot to webchat
/webchat/index.ts
Testing
Adds a test for the new feedback_knowledgebase event