🔒 Important Message: Concerns about data privacy and sensitive client information prevent the dataset's features, attributes, and records from being displayed. The offered sample code is only intended for your comprehension and familiarity.
Chatbot Application Integration With Website
Completed on 10-04-2023
We used Dialogflow to create a chatbot application for this project, which we then incorporated into our website. This chatbot reply or response to customer requests instantly and in real time by leveraging sophisticated natural language processing capabilities. Now, the users may obtain precise and effective assistance straight from the website, improving their whole experience. With its specific purpose of helping consumers with telecom routers and switching devices, the chatbot guarantees prompt and accurate customer support. users providing with prompt answers to their questions, this approach raises customer satisfaction and service quality standards.
Tech Stacks
DialogFlow
Flask
MySQL
Technologies listed above were used to implement the project's solutions.
Building and Deploying the Chatbot
Utilized Dialogflow to build the chatbot. The process involved creating intents and others attributed are used the model to understand and respond to various user queries related to telecom devices. The chatbot was then integrated into our website using Flask for the backend and MySQL for storing user interactions and logs
Sample Flask Integration Code
import os
from flask import Flask, request, jsonify
import dialogflow_v2 as dialogflow
import json
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True, force=True)
res = process_request(req)
res = json.dumps(res, indent=4)
return res
def process_request(req):
session_client = dialogflow.SessionsClient()
session = session_client.session_path('your-project-id', 'unique-session-id')
text_input = dialogflow.types.TextInput(text=req['queryResult']['queryText'], language_code='en')
query_input = dialogflow.types.QueryInput(text=text_input)
response = session_client.detect_intent(session=session, query_input=query_input)
return response.query_result.fulfillment_text
if __name__ == '__main__':
port = int(os.getenv('PORT', 5000))
app.run(debug=True, port=port, host='0.0.0.0')
This script configures a Flask server to handle user queries by interacting with Dialogflow web framework. The chatbot responds to queries instantly after processing them. The cloud service is used to host this backend in order to guarantee scalability and high availability.