Error when Implementing Conversation Creation Method Similar to OpenAI’s ChatGPT: Cannot Read Properties of Null
I am attempting to implement the same conversation creation method that OpenAI’s ChatGPT uses. This involves displaying an empty chat when a user clicks the button to start a new conversation. Only when the user enters a message should the conversation be created and stored in the database, with that message linked to the newly created conversation.