I’m currently trying to serve multiple bots (running different models) and to allow users to interact with it on a website. I’ve had a look at the following: http://www.rasa.com/docs/nlu/http/, http://www.rasa.com/docs/core/http/ and http://www.rasa.com/docs/nlu/python/, but I’m still having trouble figuring out how it can be done.
Some of the solutions I’ve considered are either:
Serve the bot on a HTTP server and have my website interact with the Rasa HTTP server
Create the website on Django Framework or REST API, and run Rasa Core and NLU on the backend.
What would be the best way to go about doing this? And, could anyone please briefly explain how this can be done (with multiple bot models and instances running)?
Any help would be greatly appreciated!
For anyone else searching for an answer, I ended up using Flask as the server, along with Flask-SocketIO for real time communication. The server serves an API which allows clients to communicate with it via SocketIO, determines which bot to interact with, gets the response, and sends it back to the client.
Related
Im creating a server in Python that receives POST requests, process the information in the request using some scripts (sometimes using a database) and send back a answer in JSON format. Im searching for a way to run this server and code in the cloud, in a way that i dont need my PC turned on for it to work, because my connection is very unstable.
There are a lot of web hosting companies out there, you just need to find the one that is right for you.
My personal favorite for python apps is heroku, but there are many out there. AWS is another popular one.
In future when asking questions, try to do more research before hand, and try to be more specific with questions. It would have been useful to know what kind of database you are using, or whether you're using flask or django.
I’ve got a standard client-server set-up with ReScript (ReasonML) on the front-end and a Python server on the back-end.
The user is running a separate process on localhost:2000 that I’m connecting to from the browser (UI). I can send requests to their server and receive responses.
Now I need to issue those requests from my back-end server, but cannot do so directly. I’m assuming I need some way of doing it through the browser, which can talk to localhost on the user’s computer.
What are some conceptual ways to implement this (ideally with GraphQL)? Do I need to have a subscription or web sockets or something else?
Are there any specific libraries you can recommend for this (perhaps as examples from other programming languages)?
I think the easiest solution with GraphQL would be to use Subscriptions indeed, the most common Rescript GraphQL clients already have such a feature, at least ReasonRelay, Reason Apollo Hooks and Reason-URQL have it.
I'm learning about basic back-end and server mechanics and how to connect it with the front end of an app. More specifically, I want to create a React Native app and connect it to a database using Python(simply because Python is easy to write and fast). From my research I've determined I'll need to make an API that communicates via HTTP with the server, then use the API with React Native. I'm still confused as to how the API works and how I can integrate it into my React Native front-end, or any front-end that's not Python-based for that matter.
I think you have to follow some online tutorial
And from my experiences, I think Flask is good choice for such case.
This is basic flask tutorial provided by tutorialspoint.com
You have to create a flask proxy, generate JSON endpoints then use fetch or axios to display this data in your react native app. You also have to be more specific next time.
I am developing a chatbot using DialogFlow, as my natural language processing handler, and Python as my client.
My application aims to talk with a human in a python environment (I am currently using a Jupyter Notebook), send the request to DialogFlow, get the response, then calculate the data using some python libraries and show the results to the user.
All the process described above is already working.
Now I must to find a way that lets the people uses my chatbot on line.
Here is my problem, I don't know how to model this.
I think I should put my chatbot in a webpage and make it communicate with my python application stored in a server.
Did anybody make something similar?
Given your current architecture, you'll have to do the following:
Write a client for your chatbot in HTML and JavaScript
Write a server in Python that contains your application logic and makes the API calls to Dialogflow
This is a pretty normal architecture for a web application. Given that you're using Python, you might find Flask or Django helpful.
There should be plenty of samples out there that can help you figure out what to do; I just found this blog post that demonstrates how to build a simple chat client/server with Flask and websockets.
If you're willing to change your architecture so that the user interacts directly with Dialogflow, and all of your application logic lives in the Dialogflow fulfillment webhook, you can make use of Dialogflow's Web Demo integration that provides a pre-built chat widget you can embed into an HTML page.
I am building a server using Flask that will be called by a web client.
When a certain change occurs on the db my Flask app interacts with, I need the web client to be alerted so it can display the update.
Would someone be able to give me some direction as to what I should be looking into with regards to both the Flask and web client sides?
Thanks.
The terminology you are using is a little confusing. I'm going to assume the web client is someone visiting your Flask app over the internet.
Basically, if you want the ability for the server to push updates to the client you need to use websockets
http://en.wikipedia.org/wiki/WebSocket