![]() What about making it multilingual so that our Spanish, French, Dutch or Chinese colleagues could write commands in their language and have the chatbot process and work correctly? Awesome right? Google Cloud Translation Service might just come in handy here.īuilding a chatbot platform is not rocket science. The chatbot understands commands written only in English. The chatbot will convert audio to text, pass the text onto the Parser Service, process and return the desired results. In addition, we can connect the chatbot with Google Cloud Speech API to enable a user to speak the commands to the bot. We can have the chatbot analyze images and detect objects in them. The Image Transformation Chatbot can be further improved to provide more functionality. The server.js is simply responsible for processing the commands from the frontend via the parser service and returning the right responses. It obtains the required transformation parameters and generates the Cloudinary URL with those parameters. Var filename = (0,('.')) ĪpiUrl += filename + '.' + context.format Transforms.push("w_"+context.width+",h_"+context.widthĬloudName + '/' + resource + '/' + operation + '/' If(toSharpen) transforms.push("e_sharpen") If(toContrast) transforms.push("e_auto_contrast") If(!context.format) context.format = 'jpg' Taking the overlay action and applying the needed Cloudinary transformation. The ParserService is a giant service responsible for analyzing keywords in the commands such as upload, display, show, resize, reset, make, overlay and processing it. The ImageService is responsible for communicating with PubNub channels on setting and getting image paths in real time.Ĭheck out the src/ParserService.js. You can change the publishKey and subscribeKey values to the credentials from our PubNub dashboard. Note: You can change the cloud_name and upload_preset to the credentials from your Cloudinary dashboard. ShowUploader() is responsible for calling the Cloudinary upload widget. Render() is responsible for displaying the send, Upload Image buttons and the history of messages sent in the chatbot. render() ,Ĭonsole.log("the upload path is", result.path) Open up the source code.Ĭheck out the src/App.js file. PubNub – a service for developing Real-time applications. ![]() ![]() Cloudinary – a cloud-based, end-to-end image and video management solution that enables uploads, storage, administration, image transformation and delivery.Node – for building the backend that interacts with the Cloudinary service for image editing.React – for building out the front-end of the image editing tool.I entered the command please set the width to 500 and it immediately cropped the image and returned the smaller size.Įasy, isn’t it? Next, let’s talk about the stack. The first image is the original size of the uploaded image. I used the command please overlay ACME logo at the south-west corner and the resulting image was the previously uploaded image with ACME logo placed on it as specified in the command. Let’s analyze the technology behind the chatbot platform.īefore we start, you will want to clone the chatbot from GitHub.įollow the instructions on the README and execute the commands displayed on the repo in the right sequence.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |