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.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too