LucasBassetti/react-simple-chatbot

how to change the bot avatar ?

Closed this issue · 3 comments

I set the botAvatar props to the name of the image in the same directory as my javascript file
bellow the bot avatar didn't show
image

headerTitle="Speech Synthesis" speechSynthesis={{ enable: true, lang: 'en' }} steps={steps} botAvatar="robot_AI.png" floating recognitionEnable /> </ThemeProvider> </Wrapper> </Layout>

Here is the code
<Layout> <Wrapper> <ThemeProvider theme={theme}> <ChatBot headerTitle="Speech Synthesis" speechSynthesis={{ enable: true, lang: 'en' }} steps={steps} botAvatar="robot_AI.png" floating recognitionEnable /> </ThemeProvider> </Wrapper> </Layout>

I don't how your project is set up. But if it create react app or similar you could just import your image.

import botAvatarImg from '[path-to-asset]/robot_AI.png
...
 <ChatBot headerTitle="Speech Synthesis" speechSynthesis={{ enable: true, lang: 'en' }} steps={steps} botAvatar={botAvatarImg} floating recognitionEnable /> 

Thanks it work