We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi , I have just gone through the docs. I could see that the feedback buttons can be added to the demo chat like
ngAfterViewInit(){ if (this.chatElementRef?.nativeElement) { this.chatElementRef.nativeElement.demo = { response: { html: <div class="feedback"> <img class="feedback-icon feedback-icon-positive" src="path-to-svg.svg"> <img class="feedback-icon feedback-icon-negative" src="path-to-svg.svg"> </div>, }, }; this.chatElementRef.nativeElement.htmlClassUtilities = { feedback: {styles: {default: {display: 'flex'}}}, 'feedback-text': {styles: {default: {width: 'calc(100% - 42px)', paddingTop: '2px'}}}, 'feedback-icon': { styles: { default: {width: '20px', height: '20px', cursor: 'pointer', borderRadius: '5px'}, hover: {backgroundColor: '#d1d1d1'}, }, }, 'feedback-icon-positive': {events: {click: () => console.log('positive response')}}, 'feedback-icon-negative': { events: {click: () => console.log('negative response')}, styles: {default: {transform: 'rotate(180deg)', marginLeft: '3px'}}, }, }; } } this adds feedback button for demo responses When connected to a server how to add those feedback button to all the messages from ai . I'm using angular framework.
<div class="feedback"> <img class="feedback-icon feedback-icon-positive" src="path-to-svg.svg"> <img class="feedback-icon feedback-icon-negative" src="path-to-svg.svg"> </div>
The text was updated successfully, but these errors were encountered:
Hi @Nithiya2223. If you are asking about how to wrap ai response text into messages that have the feedback button - you can go about it in many ways:
html
{ html: ` <div class="feedback"> <div class="feedback-text">Your text here.</div> <img class="feedback-icon feedback-icon-positive" src="path-to-svg.svg"> <img class="feedback-icon feedback-icon-negative" src="path-to-svg.svg"> </div>` } }
Let me know if this helps. Thanks!
Sorry, something went wrong.
OvidijusParsiunas
No branches or pull requests
Hi ,
I have just gone through the docs. I could see that the feedback buttons can be added to the demo chat like
ngAfterViewInit(){
if (this.chatElementRef?.nativeElement) {
this.chatElementRef.nativeElement.demo = {
response: {
html:
<div class="feedback"> <img class="feedback-icon feedback-icon-positive" src="path-to-svg.svg"> <img class="feedback-icon feedback-icon-negative" src="path-to-svg.svg"> </div>
,},
};
this.chatElementRef.nativeElement.htmlClassUtilities = {
feedback: {styles: {default: {display: 'flex'}}},
'feedback-text': {styles: {default: {width: 'calc(100% - 42px)', paddingTop: '2px'}}},
'feedback-icon': {
styles: {
default: {width: '20px', height: '20px', cursor: 'pointer', borderRadius: '5px'},
hover: {backgroundColor: '#d1d1d1'},
},
},
'feedback-icon-positive': {events: {click: () => console.log('positive response')}},
'feedback-icon-negative': {
events: {click: () => console.log('negative response')},
styles: {default: {transform: 'rotate(180deg)', marginLeft: '3px'}},
},
};
}
} this adds feedback button for demo responses
When connected to a server how to add those feedback button to all the messages from ai .
I'm using angular framework.
The text was updated successfully, but these errors were encountered: