Can anyone provide an example of how the chat history should be if we want to use langchain js with node js and open ai?

Im using langchain js library with open ai on node js backend, but Im having a problem at passing the chat history to prompt template for the reason that sometimes the answers are returned the same even if the question is different. I tried to do it on 2 ways:

  1. to pass the chat history as an array of strings with messages. (questions from the user and answers)
  2. to pass the chat history as an array of objects where inside of one object is a question and the answer.

but on both cases Im getting the same issue with the same answers from the open ai.

Pretty sure you would get better answers on that in the langchain community.