sendMessage

Sends a text message to the Nutrition Advisor.

  /**
   * Sends a text message to the Nutrition Advisor.
   * @param message - The message to be sent.
   * @returns A Promise resolving to the status of the message sending.
   */
  sendMessage(message: string): Promise<PassioAdvisorMessageResultStatus | null>

Example

import { NutritionAdvisor } from '@passiolife/nutritionai-react-native-sdk-v3'
 const response = await NutritionAdvisor.sendMessage(message)

 switch (response?.status) {
          case 'Success':
            // get your response here {response.response}
            return
          case 'Error':
          // get your erorr response here {response.message}
            return
        }

it's returns PassioAdvisorMessageResultStatus

Last updated