Input format

Event: user_message

Description: Send this event to the API in order to handle a new user message.

Example :

const userConversation = {
	event: "user_message",
  conversation: ["Is cancer transmissible?"],
  key: "your_api_key",
	id: "your_conversation_id"'
	settings: {
		language: "English"
	}
}

The conversation key in the above code block is a list of strings. The first string "Is cancer transmissible?” is the first question of the user. The second string will be the first answer of MediSearch. For example, “Cancer is generally not transmissible between individuals. However, there are rare exceptions.”. The third string will be the second question of the user. For example "What are these rare expections?". So, it may look like:

conversation: ["Is cancer transmissible?",
							 "Cancer is generally not transmissible between individuals. However, there are rare exceptions.",
							 "What are these rare expections?"],

For the structure of the conversation, we assume:

  1. The human and bot messages are alternating*.*
  2. There is at least one message in the conversation.
  3. The last message is the human query.

Examples:

The language key should be one of the supported languages. Currently, we support English, Arabic, German, Chinese (simplified), Hindi, Japanese, French, Spanish, and Slovak.