generative-ai-js
generative-ai-js copied to clipboard
Added error throw for when user enters multiple messages.
This PR aims to address #28
Added a _messageInProgress boolean flag under the ChatSession class. This flag will be set to false initially, and will be set to true when chatSession.sendMessage() or chatSession.sendMessageStream is called. If either function is run again before the initial one completes, it will throw an error.