RevTpark / Cureya_work

Hosted API for Cureya Chatbot.

Home Page:https://cureya-chatbot.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

An API that provides replies to the message passed to the API.

API Schema

Route: /api/chatbot/query/
Method: POST
Headers: Content-Type: application/json
Input: message Input is taken in form of JSON object.
Output: solutions Output provided as JSON object. Status Code: 200

How to use?

{
    "message": "Some message here"
}

as a JSON object.

  • The API will evaluate the correct response and send the reply as:
{
    "solutions": ["All", "Solutions", "Are", "Sent"]
}

as a JSON object.

Editing the API code

  1. Clone the Repo.
  2. Install requirements.txt.
  3. Go to the chatbot_api folderand locate views.py.
  4. Import required script at the top of the file that will generate the replies.
  5. The class BotSolutions contains the API code.
  6. data variable contains the message sent in stringformat. The data variable can be sent to the script directly and stored in solutions variable.
  7. Pass the solutions variable to the JSONResponse.

About

Hosted API for Cureya Chatbot.

https://cureya-chatbot.herokuapp.com/


Languages

Language:Python 100.0%