8/19/2023 0 Comments Twilio send whatsapp message![]() ![]() Note that the minimum number of examples is 2 and the maximum is 2,500, with a maximum of 512 tokens per example.Ĭohere Docs - Review all documentation of what you can do with Cohere services. Optimize the examples, storing them in a database and adding more for each class, which will make the predictions with a higher level of confidence.Send more than 1 message in the same API call (already supported by the class you have built), which will save you time and costs in calls.This is a great start, and to continue, you can: In a few seconds, you will see the message with the prediction and confidence percentage. To test, in the conversations with the Sandbox number, send a text message using WhatsApp. In the new shell, run ngrok with the following command, specifying the HTTP URL that your application is listening to: NET application running and open a separate shell. That's why you'll use ngrok to create a secure tunnel between your locally running API and ngrok's public forwarding URL. Your web app needs to be publicly accessible for Twilio to send the message webhook requests to your application. ![]() Make your webhook public with ngrok for testing Now you are able to send messages to the Sandbox number and receive messages from the Sandbox number. If you want to send messages to other numbers, the people who own those numbers will have to do this same step.Īfter that, you will receive a message in response confirming the Sandbox is configured. This will enable that WhatsApp number to use to send messages to your own WhatsApp number. ![]() Next, you have to follow the instruction on the screen, in which you must send a pre-defined message to the indicated number through WhatsApp. After that, in the available options open the " Try it out" submenu, and finally, click " Send a WhatsApp message". In order to get to the WhatsApp sandbox, in the left-side menu of the Twilio console click on " Messaging" (if you don't see it, click on " Explore Products", which will display the list with the available products, and there you will see "Messaging"). To send WhatsApp messages through your Twilio account, you need to create a WhatsApp Sender, but for testing and developing locally, you can, and in this tutorial, you will use the Twilio Sandbox for WhatsApp. Open a terminal and run the following commands to create a folder that will contain your project: You will need to create a console project using the. Next, generate a new trial key by clicking on the “ New trial key” button, giving a name, and saving it as you will use it later.Ĭreate your web app Initialize your project In order to use Cohere Classify, you will need a Cohere AI account.Īfter registration, you will see your dashboard, where among various options and examples, you can generate your API key:Ĭlick on " API keys", where you will see the option to create productive API keys (paid with better performance) and trial keys (free). For example, you can classify messages received from customer service through WhatsApp, SMS, or Email. Within Cohere's services, there is Classify, which, as its name indicates, from a few examples, you can classify new texts, specifying the text and the label (classification). A Twilio account ( try out Twilio for free)Ĭohere is a platform that offers different Artificial Intelligence services using natural language and LLM (Large Language Model), similar to other platforms such as OpenAI, among others.NET 6 SDK (earlier and newer versions should work too) NET IDE ( Visual Studio, VS Code with C# plugin, JetBrains Rider, or any editor of your choice) ![]() You will need the following for your development environment: In this post, you are going to create a web app that, using the Cohere Classify service, will be able to classify any received text message using Twilio for WhatsApp. Now, thanks to Artificial Intelligence (AI), it can be done based on its content. Several companies have a system that classifies the message (like SMS, WhatsApp, or Email) based on the sender, recipient, or subject. Classifying information or messages that you receive in your business/project is essential to know how to prioritize or direct such data to another process, so certain actions can be taken based on it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |