OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.43k stars 221 forks source link

'Error, Please try again.' displayed when using initial message #67

Closed ecomnet closed 9 months ago

ecomnet commented 9 months ago

Thank you for releasing this very easy to use code.

I tried to use React and test it, and the error occurs like below. I tested the Suggestion buttons example on https://deepchat.dev/docs/messages/HTML with a real OpenAI API key.

After a few tests, I got 'Error, Please try again' when initialMessages has 'html' in it. If it is 'text', it works fine.

{ html: `

`, role: 'ai', } Also, is there an option to make the introPanel not disappear after the message is entered?
OvidijusParsiunas commented 9 months ago

Hi @ecomnet. Thankyou for notifying me about this issue. I am going to work on a fix for it. I will update this thread on the progress.

OvidijusParsiunas commented 9 months ago

To answer your question about the introPanel. The chat is configured to remove it, however if you want to keep it I would instead recommend you to use the introMessage with a html property which will stay in the chat view. You can style the message via the htmlClassUtilities property.

OvidijusParsiunas commented 9 months ago

This issue has now been fixed in the deep-chat-dev and deep-chat-react-dev packages version 9.0.95. These packages work exactly the same except their names are different.

The changes will be moved to the main package later this week or early next week.

OvidijusParsiunas commented 9 months ago

This bug fix has now been released in deep-chat and deep-chat-react package version 1.4.6.