Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[FEATURE] Suppress System Messages in Frontend

Open toi500 opened this issue 1 year ago • 2 comments

Describe the feature you'd like In the Embed Chat configuration, allow the option to set up a default error response that the chatbot will provide when it encounters unexpected issues. This will prevent technical error messages from being displayed to users in the frontend, improving the user experience and avoiding the disclosure of sensitive information.

-- image

Additional context Currently, the chatbot display system errors directly to users in the frontend. While this is helpful for debugging, it can be awkward and expose internal technical details that users shouldn't see in a production environment.

-- Screenshot 2024-04-10 163027

toi500 avatar Apr 11 '24 02:04 toi500

I've been meaning to ask for the same. This is an important one. I would only add that it would be ideal to specify in the chatflow configuration rather than the embed so the error message could be used when the chatflow is accessed via api as well.

saatchi-david avatar Apr 11 '24 07:04 saatchi-david

Actually you are right. Setting this custom system message in the Chatflow Configuration would be even better.

toi500 avatar Apr 11 '24 15:04 toi500

@0xi4o has put up a PR for that.

You can now specify custom error message on embedded:

Chatbot.init({
    chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f',
    apiHost: 'http://localhost:3000',
    theme: {
      chatWindow: {
        errorMessage: 'This is a custom error message'
      }
    }
})

HenryHengZJ avatar Apr 18 '24 17:04 HenryHengZJ

Awesome! Thanks @HenryHengZJ ! Are there any plans to include this in the chatflow configuration? It would be great if the custom error message could be used when there are errors over the API as well.

Edit: tagging @0xi4o as I see he added the feature. Thank you both!

saatchi-david avatar Apr 19 '24 03:04 saatchi-david