SlideShare a Scribd company logo
1 of 34
1
ABSTRACT
The "AI Powered Campus Resource Assistance" project leverages cutting-edge technologies such as Natural
Language Processing (NLP) and Generative AI to enhance campus experiences through an intelligent and
conversational interface. Developed on the Google Dialog flow platform, our solution aims to revolutionize
the way students and faculty access and interact with campus resources.
The system employs NLP to understand and interpret user queries, allowing for seamless communication
between users and the AI assistant. Through the integration of Generative AI, the platform goes beyond
predefined responses, generating contextually relevant and personalized information tailored to the user's
needs. This dynamic approach enables the AI to adapt to various scenarios, providing a more human-like
interaction and enhancing user engagement.
Key features include real-time assistance with campus navigation, event information, academic queries, and
other resource-related inquiries. Users can effortlessly seek information, receive updates, and engage in
meaningful conversations, fostering a more connected and informed campus community.
By harnessing the power of Google Dialog flow, our project not only streamlines information retrieval but also
ensures scalability, accessibility, and ease of integration with existing campus systems. This AI-driven solution
represents a significant step toward creating an intelligent, user-centric campus environment, ultimately
enhancing the overall educational experience for all stakeholders.
2
CHAPTER 1
INTRODUCTION
1.1 ABOUT THE DOMAIN
1.1.1 ARTIFICIAL INTELLIGENCE
Artificial Intelligence (AI) stands at the forefront of technological innovation, representing a
paradigm shift in the capabilities of machines. This multidisciplinary field integrates computer
science, mathematics, engineering, and cognitive science to create intelligent systems capable of
emulating human-like intelligence. The primary objective is to enable machines to learn, reason, and
adapt, revolutionizing the way we interact with and leverage the power of technology.
At the core of AI lies Machine Learning (ML), which empowers systems to learn from data and
improve performance iteratively. Natural Language Processing (NLP) focuses on enabling machines
to understand and generate human language, while Computer Vision interprets and processes visual
information. Robotics, coupled with AI, leads to the creation of intelligent machines capable of both
cognitive and physical tasks.
The general problem of simulating (or creating) intelligence has been broken down into sub-
problems. These consist of particular traits or capabilities that 2 researchers expect an intelligent
system to display. The traits described below have received the most attention and cover the
scope of AI research.
3
1.1.2 BIG DATA
Big data is a collection of data sets so large and complex that it becomes difficult to process using
on-hand database management tools. The challenges include capture, curation, storage, search,
sharing, analysis, and visualization.
The trend to larger data sets is due to the additional information derivable from analysis of a single
large set of related data, as compared to separate smaller sets with the same total amount of data,
allowing correlations to be found to "spot business trends, determine quality of research, prevent
diseases, link legal citations, combat crime, and determine real-time roadway traffic conditions.
Put another way, big data is the realization of greater business intelligence by storing, processing,
and analyzing data that was previously ignored due to the limitations of traditional data management
technologies.
The four dimensions of Big Data
• Volume: Large volumes of data
• Velocity: Quickly moving data
• Variety: structured, unstructured, images, etc.
• Veracity: Trust and integrity is a challenge and a must and is important for big data just as for
traditional relational DBs
• Big Data is about better analytics!
4
1.1.3 MACHINE LEARNING
Machine learning (ML) is the scientific study of algorithms and statistical models that computer
systems use to effectively perform a specific task without using explicit instructions, relying on
models and inference instead. It is seen as a subset of artificial intelligence. Machine learning
algorithms build a mathematical model of sample data, known as "training data", in order to make
predictions or decisions without being explicitly programmed to perform the task. Machine learning
algorithms are used in the applications of email filtering, detection of network intruders, and
computer vision, where it is infeasible to develop an algorithm of specific instructions for performing
the task. Machine learning is closely related to computational statistics, which focuses on making
predictions using computers. The study of mathematical optimization delivers methods, theory and
application domains to the field of machine learning. Data mining is a field of study within machine
learning and focuses on exploratory data analysis through unsupervised learning. In its application
across business problems, machine learning is also referred to as predictive analytics.
Machine learning tasks are classified into several broad categories. In supervised learning, the
algorithm builds a mathematical model of a set of data that contains both the inputs and the desired
outputs. For example, if the task were determining whether an image contained a certain object, the
training data for a supervised learning algorithm would include images with and without that object
(the input), and each image would have a label (the output) designating whether it contained the
object. In special cases, the input may be only partially available, or restricted to special feedback.
Semi algorithms develop mathematical models from incomplete training data, where a portion of the
sample inputs are missing the desired output.
In unsupervised learning, the algorithm builds a mathematical model of a set of data which contains
only inputs and no desired outputs. Unsupervised learning algorithms are used to find structure in
the data, like grouping or clustering of data points. Unsupervised learning can discover patterns in
the data, and can group the inputs into categories, as in feature learning. Dimensionality reduction is
the process of reducing the number of "features", or inputs, in a set of data.
5
1.2 PROBLEMS IN EXISTING SYSTEM
In the ever-evolving landscape of academia, efficient communication and instant access to
information are the cornerstones of a thriving educational community. Introducing the "College
Companion Chatbot" – a revolutionary project aimed at reshaping how we engage with our college
environment.
The College Companion Chatbot is not just a technological innovation; it's a strategic move towards
a more connected and informed college ecosystem. This intelligent solution is crafted to provide an
instant and accurate response to a myriad of queries, ensuring every member of our community has
seamless access to vital information.
Our Project is Powered by Dialog flow, a leading natural language processing platform, our chatbot
leverages cutting-edge technology to comprehend diverse user queries. This ensures a robust system
capable of understanding and responding to the nuanced needs of our users.
User-centric design principles underscore every aspect of the College Companion Chatbot. The
interface is crafted to be intuitive, ensuring that users, regardless of technical expertise, can easily
navigate and extract valuable information.
Whether inquiring about the Head of Department, seeking resource locations, or staying updated on
campus events, the College Companion Chatbot serves as a comprehensive information hub. It
simplifies complex processes, making information retrieval intuitive and user-friendly.
In recent years, the number of student enrollment in educational institutions are increasing day
by day. This led tobeing a burden on the administrative staff during admission times. It is
impossible to handle all the inquiries posed by the students via the helpdesk Email or chat.
Recognizing the dynamic nature of academic institutions, the College Companion Chatbot is
adaptive and future ready. Regular updates and planned enhancements will introduce advanced
features, ensuring the chatbot remains at the forefront of technological innovation.
6
CHAPTER 2
PROBLEM DEFINITION
2.1 Problem statement
2.1.1 Limited Availability:
Students, faculty, and staff often face challenges in accessing crucial information, such as the
current Head of Department, location of resources, and details about upcoming events.
2.1.2 Communication Gaps:
Communication breakdowns can occur, leading to delays in obtaining necessary details or
updates. This can cause the lack of interest to join a particular organization and the will to get
benefited.
2.1.3 Complex Resource Location:
Locating resources, such as ID cards, past year papers, or specific offices, can be challenging
for new and existing students. Manually finding and locating these spots can be time consuming
and make us get frustrated.
2.1.4 Language and Accessibility Barriers:
Language differences and accessibility barriers can impede effective communication between
the college and its diverse community. The are chances for the interpretation of wrong
information can occur due to lack of access to college information.
2.1.5 Limited Domain Knowledge:
Chatbots often rely on pre-trained data and may lack deep domain-specific knowledge. They may
struggle to provide accurate and detailed information on certain topics, especially in specialized
domains.
7
2.2 Objectives
The objectives of our Campus Assistance bot project include,
 To provide quick and efficient customer support 24/7.
 To automate the handling of frequently asked questions and basic customer requests.
 To improve customer engagement and satisfaction by providing
an accessible and convenient way to interact with the organization.
 Cater to the diverse language preferences of the college community.
 Prioritize user-centric design principles.
2.3 Working
The College Companion Chatbot operates as a dynamic and user-centric conversational agent,
providing an innovative solution to streamline communication and enhance accessibility within
the college community. Leveraging the power of Dialog flow, a leading natural language
processing platform, the chatbot excels in understanding and responding to diverse user queries.
Users can seamlessly interact with the chatbot through text or voice input, obtaining instant and
accurate information on a range of topics.
Whether inquiring about the current Head of Department, locating resources on campus, staying
informed about upcoming events, or seeking emergency notifications, the chatbot serves as a
comprehensive information hub. It bridges communication gaps by delivering real-time
announcements, news, and updates to students, faculty, and staff. The chatbot's interface is
designed with user-centric principles, ensuring an intuitive and accessible experience for
individuals with varying levels of technical expertise.
It operates across multiple platforms, including web and mobile, providing users with on-the-go
access to its capabilities. By introducing user profiles, the chatbot enables personalization,
allowing individuals to tailor their experience and receive personalized information. Regular
updates and enhancements ensure the chatbot remains adaptive, future-ready, and at the forefront
of technological innovation. Overall, the College Companion Chatbot redefines how the college
community communicates, accesses information, and engages within the academic environment.
8
2.4 Existing model
Lack of Common-Sense Understanding: Many chatbots struggle with grasping common-
sense reasoning and may provide responses that lack contextual understanding or seem
nonsensical in certain situations.
Handling Ambiguity: Existing models may face difficulties in handling ambiguous queries or
requests, leading to responses that lack specificity or fail to address the user's intended meaning.
Over-Reliance on Training Data: Models trained on large datasets may inadvertently capture
biases present in the data, leading to biased responses or reinforcement of stereotypes.
Inability to Ask Clarifying Questions: Existing models may struggle to ask clarifying
questions when faced with ambiguous queries. Instead, they might guess the user's intention,
potentially leading to misunderstandings.
Graph 2.1 The fall in the admission rate of Top institutes
From Graph 2.1 we infer that college admission rates drop irrespective of their reputation and
achievements. They lack the necessary requirements for college admissions and hence their admission
rates drop.
9
2.5 LITERATURE SURVEY
[1] Intelligent Agents in Educational Institutions: NEdBOT - NLP-based Chatbot for
Administrative Support Using DialogFlow
AUTHORS: Muhammad Shahroze Ali, Farooque Azam, Aon Safdar
The primary objective of this paper is to examine how a chatbot can decrease the burden on
administrative staff during admissions times by automatically providing online assistance on
frequently asked questions, student support, and providing quick access to the data. To
accomplish this, we created NEdBOT, a chatbot that provides admission information support
[2] Chatbot Intent Recognition for College Website using Dialog flow.
AUTHORS: Ari Setiaji and Irving V Paputungan
This paper successfully explains the implementation of chatbot (ViBOT) using Dialogflow
which will give the required information regarding college. With the help of different
Integration like Facebook Messenger, web demo amd many more it will create multiple
platforms for user. The Dialog flow help us to import and export chat agent which is easier
than any other platform. This chatbot will give benefit to the user by saving time and internet
usage which is a key of effective chatbot.
[3] A Multi-Model and Ai-Based Collegebot Management System (Aicms) For
Professional Engineering Colleges
AUTHORS: K.Arun, Sri Nagesh, P.Ganga
This AICMS bot is an auto AI based college information and interactive system. It trained
with all the required college information and regular conversations. Once trained the bot it
works always without human intervention. Dialog flow interfaces were implemented to
design as the core part without any code. As an interface Facebook is used. The College Bot
creates a single conversational platform for the students, staff, and the principal.
10
[4] Chatbot Using Dialog flow and Web Services
AUTHORS: A.Alcayde Garcia E. Salmeron-manzano
In this project, the author had trained a bot and configure a server to take messages from the user
and interpret it and gives back a relevant reply based upon the context and intentions of the user.
The bot contacts Zomato using its APIs to get additional information to serve the user for the
queries based on the hotels, cuisines., etc.This is possible by understanding the user interaction at
a greater level and to understand their various slangs and dialects of the grammar. This makes
more convenient and more comfortable for the user to interact.
[5] Chatbot with Dialog flow for FAQ Services in Matana University Library
AUTHORS: Simon Prananta Barus, Evalien Surijati
This chatbot will be continued to the phase of system implementation and maintenance. A chatbot
is made more reliable to respond to various items such as providing book descriptions,
information on the status of book or book borrowing, handling new member registration,
obtaining user satisfaction.
[6] AI Based Chatbot for placement activity at college using Dialogflow
AUTHORS: Kannadasan R, Prabakaran N, Krishnamoorthy A
Authors have reported design and development of AI based Chatbot for handling placement
activities in professional college. This agent provides information related to placement activities
to students. NLP module of DialogFlow translates students’ queries into structured data in order
to understand institute’s service.
11
2.5.1 Consolidated study:
The research papers discussed highlight the development and implementation of AI-based
chatbots for specific purposes. One focuses on a chatbot designed for library management,
addressing tasks like book descriptions, status updates on book borrowing, new member
registration, and user satisfaction. The other paper details a chatbot dedicated to handling
placement activities in a professional college, offering information related to career placement.
In both cases, the integration of Natural Language Processing (NLP) modules, such as
DialogFlow, stands out. This technology aids in translating user queries into structured data,
enabling the chatbots to comprehend and respond effectively.
The training and configuration of the chatbots are key aspects, emphasizing a hands-on approach
to development. The papers discuss the practicality of training the bot and configuring a server
to ensure seamless communication and relevant responses.
External API integration is showcased as a notable feature, with one chatbot connecting to
Government APIs to gather additional information.
This extends the chatbot's functionality beyond its initial scope, providing users with details
about hotels and cuisines.
Understanding user interactions, including slangs and dialects, is a shared focus. Both papers
aim to make the chatbot interaction more user-friendly, convenient, and comfortable,
emphasizing the importance of user-centric design.
12
CHAPTER 3
SOFTWARE REQUIREMENT SPECIFICATION
3.1 What is Software requirement specification?
The Software Requirements Specification (SRS) is a comprehensive document outlining the
behavior of the system to be developed. It encompasses a set of use cases that thoroughly
describe all interactions users will have with the software. In addition to these use cases, the
SRS includes non-functional requirements, which impose constraints on the design or
implementation, such as performance standards, engineering requirements, quality standards,
or design constraints. Software requirements form a crucial subfield of software engineering,
dealing with the elicitation, analysis, and specification of all necessary requirements for project
development. Developing a clear and thorough understanding of the products to be created is
essential for deriving these requirements.
Prepared after detailed communication with both the project team and the customer, the Software
Requirements Specification serves as a comprehensive description of the intended purpose and
environment for the software under development. The report provides a detailed account of
what the software is expected to do and how it will perform. A well-crafted SRS defines the
interactions of an application and serves as a fundamental document guiding the development
process.
3.2 Requirement analysis
3.2.1 Purpose
The core objective of this chatbot is to seamlessly integrate advanced technologies, primarily
focusing on Natural Language Processing (NLP), to enhance its technical capabilities and user
interactions. By incorporating NLP modules such as DialogFlow, the technical aim is to
13
empower the bot to interpret and respond to user queries in a manner that mirrors natural
language, fostering a more intuitive and human-like conversational experience. The training
and configuration processes are geared towards preparing the bot to understand specific
contexts and efficiently handle a diverse range of user queries
3.2.2 Interface requirements
This interface should be intuitive and easy to use, allowing users to quickly and easily get the
information they need. The interface is customizable to suit the specific needs and goals of
the chatbot. Provide an intuitive and user-friendly interface for users to interact with the
chatbot.
3.3 Hardware requirements
1. PROCESSOR : Any Mobile Processor
Any Computer Processor
2. STORAGE : Minimum 16GB
3. MEMORY : 3GB
3.4 Software Requirements
1. OPERATING SYSTEM : Windows/MacOS/Android/iOS
2. DEVELOPMENT
ENVIRONMENT : Google Dialog Flow
3. DATABASE : Google Cloud
14
CHAPTER 4
Architecture
4.1 Proposed System Architecture
Fig.4.1 System Architecture for Resource Bot
1. From Fig. 4.1 we theorize that. User sends a request to the bot through DialogFlow Interface
2. The request is received by the Dialogflow, It takes user input, processes it, and determines the
appropriate response based on predefined intents, entities, and fulfillment logic.
3. The Dialogflow agent communicates with a fulfillment server. This server hosts the business logic
and handles more complex operations that go beyond the capabilities of Dialogflow's built-in
features.
4. It can be implemented using cloud functions, a web server, or any backend technology.
5. The fulfillment server may interact with external services or APIs to gather additional information
6. The chatbot can be integrated with various messaging platforms such as Facebook Messenger,
Slack, or others, allowing users to interact with the bot through their referred channel.
7.
15
4.2 Conversational AI Chatbot with Task-specific Capabilities.
 The user interface module provides an intuitive platform for users to interact with the chatbot.
It caters to library-related queries, placement information, and restaurant recommendations.
 The Dialogflow module is responsible for natural language understanding. It encompasses
intents, entities, and training phrases tailored for library management, placement activities,
and restaurant inquiries
 The database module is responsible for storing and retrieving data related to library
management, ensuring persistence and data continuity across user sessions.
 For response generation purposes, it has been categorized it into two blocks, the first one is
a Non-Informational Retrieval based intent response, and the second one is an Informational-
Retrieval based intent response.
 For Non-Informational Retrieval based intent, such as Welcome and Good_Bye, fixed and
unchangeable responses are generated.
16
4.3 Model Output
Fig. 4.3.1 output for command Cash Counter
From fig. 4.3.1 serves a visual aid in understanding the output of the module. It displays the results
for the user query in an organized and comprehend manner. The information is presented in a clear and
concise format, allowing for an effortless assessment of the output. With just a glance at the figure, one can
immediately understand the outcome without any ambiguity.
17
CHAPTER 5
OBJECT ORIENTED ANALYSIS
5.1 Sequence Diagram
Fig.5.1 Sequence Diagram for Resource Rover bot
The sequence diagram Fig. 5.1.1 for the Resource Rover chat bot begins the process
by the message from the user to the NLP bot. Bot sends the http request to the NLP Engine
of the complete program which will respond according to the request given by the use. This
entire response is further termed as process message and reply will finally be given.
18
5.2 Use Case Diagram:
Fig.5.2Use Case Diagram for Resource Rover bot
The use case diagram Fig 5.2. for the NLP chatbot that specializes information based queries.
The query management is completely managed by administrating system which will also be
taking part in maintenance of the response to the request given by the request. The system
administrator should also be responsible for linking the chatbot with the data on the
Dialogflow so that the user could get the information about his requests regarding the
19
CHAPTER 6
IMPLEMENTATION AND RESULTS
6.1 MODEL DESCRIPTION
1. User Interface Module:
Description: The user interface serves as the primary interaction point for users to
engage with the Resource Rover. It can be implemented as a web-based chat interface,
a mobile app, or integrated with messaging platforms.
2. Dialogflow Module:
Description: The Dialogflow module is the core of the Resource Rover, responsible for
natural language understanding. It involves setting up intents, entities, and training
phrases tailored for educational resource queries.
3. Fulfillment Module:
Description: The fulfillment module contains the business logic to process user requests
related to educational resources. It interprets and executes commands such as providing
information on available courses, recommending study materials, or offering guidance
on research topics.
4. Resource Database:
Description: This module includes a comprehensive database of educational resources,
including courses, books, articles, and other materials. It allows the Resource Rover to
retrieve accurate and up-to-date information based on user queries.
5. External Services Integration Module:
Description: Integration with external educational platforms and databases enhances the
Resource Rover's capabilities. This could involve partnerships with online learning
platforms, libraries, or academic databases to fetch additional resources.
6. User Profiling and Personalization:
Description: User profiling helps the Resource Rover tailor responses based on
individual preferences, learning styles, and academic history. It provides personalized
20
recommendations for courses, study materials, and resources.
7. Security and Privacy Module:
Description: Given the sensitivity of educational information, a robust security module
ensures the confidentiality and privacy of user data. It may include encryption
mechanisms and access controls.
8. Natural Language Generation (NLG):
Description: NLG is employed to generate human-like responses, ensuring that the
Resource Rover's interactions feel natural and engaging for users.
9. Accessibility Features:
Description: To ensure inclusivity, the Resource Rover includes accessibility features,
such as compatibility with screen readers and adherence to accessibility standards.
10. Continuous Learning Module:
Description: The chatbot incorporates mechanisms for continuous learning. User
feedback and interactions contribute to improving the chatbot's responses and expanding
its knowledge base over time.
21
6.2 IMPLEMENTATION SCREENSHOT
Fig 6.2.1 Implementation of existing solution
The above Fig 6.2.1 portraits the command of the existing work related to the admission related query in the
college. Where we could see that the question raised as “Give me the admission wing details”.The reply is
like “The Admission wing is present at the admin block, you can contact at +91 9442343439 for admission
related queries”
22
Fig 6.2.2 Implementation of Proposed solution
The above Fig 6.2.2 portraits the command of the proposed work related to the resource related query in the
college. Where we could see that the question raised as “Who is the hod of CSBS”.The reply is like “The
Head of Department of CSBS is Dr.N.Danapaquime.”
23
6.3 COMPARISON BETWEEN EXISTING MODEL AND PROPOSED MODEL
Performance Metric Achieved Results
F1-Score 76.5%
Accuracy 76.8%
Precision 76.3%
Table 6.3.1 Existing work’s Intent classification results
Performance Metric Achieved Results
F1-Score 78.465%
Accuracy 76.95%
Precision 80.3%
Table 6.3.2 Proposed work’s Intent classification results
In the existing work, the intent classification achieved an F1-Score of 76.5%, an Accuracy of 76.8%, and a
Precision of 76.3%. These results indicate a robust performance in accurately identifying and classifying user
intents within the given context.
Comparatively, the achieved results in the present study exhibit an even higher level of accuracy, with an F1-
Score of 78.465%, an Accuracy of 76.95%, and a Precision of 80.3%. This improvement suggests
advancements in the intent classification model, resulting in a more precise and reliable system for discerning
user intentions
24
CHAPTER 7
CONCLUSION AND FUTURESCOPE
7.1 Conclusion
In conclusion, this Resource chatbot for college related questions might offer a practical
and approachable manner for students to acquire the details they require regarding the
admissions process. It allows students to ask questions and receive answers in real-time,
eliminating the need for phone calls or in-person visits. The chat bot can also provide a
consistent and standardized source of information, ensuring that all prospective students
receive the same information, regardless of who they speak to.
By providing a user-friendly and efficient means of communicating with the university, the
chat bot can help to streamline the resource related things and improve the overall experience
for prospective students.
Chatbots may inadvertently generate content that is inappropriate, offensive, or violates
ethical standards, as they learn from the data they are trained on, which can sometimes include
biased or harmful language.
25
7.2 Future Scope
The future scope of chat bots, especially in the area of admission queries, is promising some
possible directions are.
Personalization: Chat bot can be programmed to personalize their responses based on the user's
previous interactions, providing a more tailored experience for each student.
Multi-language support: This Chat bot can be designed to support multiple languages, making
them accessible to a wider range of students.
Artificial intelligence and machine learning: Advancements in artificial intelligence and
machine learning can allow chat bots to become more intelligent and provide more
sophisticated answers to students' questions.
Automation of administrative tasks: This bots can be used to automate administrative tasks,
such as processing applications or sending reminders, freeing up staff time for more complex
tasks.
Voice Recognition and Synthesis: Introduce voice recognition capabilities to allow users to
interact with the chatbot using voice commands. Additionally, implement voice synthesis to
enable the chatbot to respond in a natural-sounding voice.
26
7.3 REFERENCES
 Hafiz M 2015 ELISA: E-Learning Integrated Short Announcement Colloquium in
Computer and Math. Sci. Education p 110. ," 2019 IEEE Conference on Systems,
Process and Control (ICSPC)
 Intelligent Agents in Educational Institutions: NEdBOT - NLP-based Chatbot for
Administrative Support Using DialogFlow.
 Pinto R 2014 Secure Instant Messaging Master Thesis (Department of Computer
Science and Engineering, Frankfurt University).
 Design of Bots for Campus Information Sharin March 2018 (IOP Conference Series
Materials Science Engineering) 325(1):01200DOI: 10.1088/1757-
899X/325/1/012005
WEB REFERENCES:
https://dialogflow.cloud.google.com/
https://dialogflow.cloud.google.com/#/agent/vamsrikrishnas-99qo/intents
 https://en.m.wikipedia.org/wiki/
https://python-telegram-bot.org/
https://ieeexplore.ieee.org/document/9999103/authors#authors
27
APPENDIX I
SCREENSHOTS
Fig I [2] response for EEE Department query
Fig II Response for staff search
28
Fig III response for Department Location
29
APPENDIXB
SAMPLE IMPLEMENTATION:
Fig I. Implementation details intent
30
Fig II. Implementation for achievements entity
Fig III. Information intents
31
Fig iv. Embedding with Webpage
HTML CODE FOR INTEGRATING WITH THE COLLEGE WEBSITE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>College Chatbot</title>
<!-- Add the Dialogflow Web Chat script -->
<script src="https://www.gstatic.com/dialogflow-console/fast/messenger/bootstrap.js?v=1"></script>
<script>
// Replace YOUR_PROJECT_ID with your Dialogflow project ID
const projectId = 'YOUR_PROJECT_ID';
const chatbotElement = document.querySelector('#chatbot');
window.dfMessenger = new window.dfuse({
chatId: projectId,
config: {
32
location: 'us-central1',
},
});
// Embed the chat widget
dfMessenger.render(chatbotElement);
</script>
</head>
<body>
<h1>Welcome to Our College</h1>
<p>Ask the chatbot any questions you have!</p>
<!-- Container for the Dialogflow Web Chat widget -->
<div id="chatbot"></div>
</body>
</html>
JAVA SCRIPT:
const projectId = 'YOUR_PROJECT_ID'; // Replace with your Dialogflow project ID
const sessionId = '123456'; // Replace with a unique session ID
const languageCode = 'en'; // Replace with the language code of your Dialogflow agent
$(document).ready(function () {
// Initialize the Dialogflow client
const apiEndpoint = 'https://dialogflow.googleapis.com/v2/projects/' + projectId + '/agent/sessions/' +
sessionId + ':detectIntent';
// Function to send a message to Dialogflow
window.sendMessage = function () {
const userMessage = $('#user-input').val();
if (userMessage.trim() === '') return;
displayMessage('User: ' + userMessage, 'user');
33
// Make a request to Dialogflow
$.ajax({
type: 'POST',
url: apiEndpoint,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN', // Replace with your Dialogflow API access
token
},
data: JSON.stringify({
queryInput: {
text: {
text: userMessage,
languageCode: languageCode,
},
},
}),
success: function (response) {
const fulfillmentText = response.queryResult.fulfillmentText;
displayMessage('Bot: ' + fulfillmentText, 'bot');
},
error: function () {
displayMessage('Error communicating with Dialogflow.', 'bot');
},
});
// Clear the input field
$('#user-input').val('');
};
// Function to display a message in the chat
function displayMessage(message, sender) {
34
const chatDiv = $('#chat');
const newMessage = $('<div class="' + sender + '-message">').text(message);
chatDiv.append(newMessage);
// Scroll to the bottom of the chat
chatDiv.scrollTop(chatDiv.prop('scrollHeight'));
}
});
CSS CODE:
body {
font-family: Arial, sans-serif;
}
#chat-container {
max-width: 400px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
#chat {
height: 200px;
overflow-y: scroll;
border: 1px solid #ddd;
padding: 10px;
margin-bottom: 10px;
}
.user-message {
color: #0066cc;

More Related Content

Similar to AI Powered Campus Resource Assistance using Google Dialog Flow

ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCE
ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCEANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCE
ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCEijesajournal
 
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdfUSDSI
 
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGYGeorgeDiamandis11
 
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNING
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNINGCUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNING
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNINGIRJET Journal
 
According To The Author Of “Build A Streamlined Refinery”,
According To The Author Of “Build A Streamlined Refinery”,According To The Author Of “Build A Streamlined Refinery”,
According To The Author Of “Build A Streamlined Refinery”,Jill Lyons
 
Chatbot for chattint getting requirments and analysis all the tools
Chatbot for chattint getting requirments and analysis all the toolsChatbot for chattint getting requirments and analysis all the tools
Chatbot for chattint getting requirments and analysis all the toolsSongs24
 
Every thing about Artificial Intelligence
Every thing about Artificial Intelligence Every thing about Artificial Intelligence
Every thing about Artificial Intelligence Vaibhav Mishra
 
Unveiling the Power of Machine Learning.docx
Unveiling the Power of Machine Learning.docxUnveiling the Power of Machine Learning.docx
Unveiling the Power of Machine Learning.docxgreendigital
 
computer projecttttttttttttttttttttttttttttttttttttttttt
computer projectttttttttttttttttttttttttttttttttttttttttcomputer projecttttttttttttttttttttttttttttttttttttttttt
computer projectttttttttttttttttttttttttttttttttttttttttSugatShakya5
 
How to use LLMs in synthesizing training data?
How to use LLMs in synthesizing training data?How to use LLMs in synthesizing training data?
How to use LLMs in synthesizing training data?Benjaminlapid1
 
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...PhD Assistance
 
Top 10 Essential Skill Sets For Data Scientists.pdf
Top 10 Essential Skill Sets For Data Scientists.pdfTop 10 Essential Skill Sets For Data Scientists.pdf
Top 10 Essential Skill Sets For Data Scientists.pdfUncodemy
 
The Future of Data Science: Emerging Trends and Technologies
The Future of Data Science: Emerging Trends and TechnologiesThe Future of Data Science: Emerging Trends and Technologies
The Future of Data Science: Emerging Trends and TechnologiesVaishali Pal
 
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEM
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEMINTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEM
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEMIRJET Journal
 
Voice Based Search Engine for Visually Impairment Peoples
Voice Based Search Engine for Visually Impairment PeoplesVoice Based Search Engine for Visually Impairment Peoples
Voice Based Search Engine for Visually Impairment PeoplesIJASRD Journal
 
Ch1IntroductiontoDataScience.pptx
Ch1IntroductiontoDataScience.pptxCh1IntroductiontoDataScience.pptx
Ch1IntroductiontoDataScience.pptxAbderrahmanABID2
 
Artificial Intelligence Approach for Covid Period StudyPal
Artificial Intelligence Approach for Covid Period StudyPalArtificial Intelligence Approach for Covid Period StudyPal
Artificial Intelligence Approach for Covid Period StudyPalIRJET Journal
 
Building Data Ecosystems for Accelerated Discovery
Building Data Ecosystems for Accelerated DiscoveryBuilding Data Ecosystems for Accelerated Discovery
Building Data Ecosystems for Accelerated Discoveryadamkraut
 

Similar to AI Powered Campus Resource Assistance using Google Dialog Flow (20)

ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCE
ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCEANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCE
ANALYSIS OF SYSTEM ON CHIP DESIGN USING ARTIFICIAL INTELLIGENCE
 
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf
15 DATA SCIENCE TRENDS TO RULE IN 2023.pdf
 
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY
3.BITOOLS - DIGITAL TRANSFORMATION AND STRATEGY
 
Data Science.pptx
Data Science.pptxData Science.pptx
Data Science.pptx
 
Machine learning
Machine learningMachine learning
Machine learning
 
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNING
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNINGCUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNING
CUSTOMER SUPPORT CHATBOT WITH MACHINE LEARNING
 
According To The Author Of “Build A Streamlined Refinery”,
According To The Author Of “Build A Streamlined Refinery”,According To The Author Of “Build A Streamlined Refinery”,
According To The Author Of “Build A Streamlined Refinery”,
 
Chatbot for chattint getting requirments and analysis all the tools
Chatbot for chattint getting requirments and analysis all the toolsChatbot for chattint getting requirments and analysis all the tools
Chatbot for chattint getting requirments and analysis all the tools
 
Every thing about Artificial Intelligence
Every thing about Artificial Intelligence Every thing about Artificial Intelligence
Every thing about Artificial Intelligence
 
Unveiling the Power of Machine Learning.docx
Unveiling the Power of Machine Learning.docxUnveiling the Power of Machine Learning.docx
Unveiling the Power of Machine Learning.docx
 
computer projecttttttttttttttttttttttttttttttttttttttttt
computer projectttttttttttttttttttttttttttttttttttttttttcomputer projecttttttttttttttttttttttttttttttttttttttttt
computer projecttttttttttttttttttttttttttttttttttttttttt
 
How to use LLMs in synthesizing training data?
How to use LLMs in synthesizing training data?How to use LLMs in synthesizing training data?
How to use LLMs in synthesizing training data?
 
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
 
Top 10 Essential Skill Sets For Data Scientists.pdf
Top 10 Essential Skill Sets For Data Scientists.pdfTop 10 Essential Skill Sets For Data Scientists.pdf
Top 10 Essential Skill Sets For Data Scientists.pdf
 
The Future of Data Science: Emerging Trends and Technologies
The Future of Data Science: Emerging Trends and TechnologiesThe Future of Data Science: Emerging Trends and Technologies
The Future of Data Science: Emerging Trends and Technologies
 
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEM
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEMINTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEM
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEM
 
Voice Based Search Engine for Visually Impairment Peoples
Voice Based Search Engine for Visually Impairment PeoplesVoice Based Search Engine for Visually Impairment Peoples
Voice Based Search Engine for Visually Impairment Peoples
 
Ch1IntroductiontoDataScience.pptx
Ch1IntroductiontoDataScience.pptxCh1IntroductiontoDataScience.pptx
Ch1IntroductiontoDataScience.pptx
 
Artificial Intelligence Approach for Covid Period StudyPal
Artificial Intelligence Approach for Covid Period StudyPalArtificial Intelligence Approach for Covid Period StudyPal
Artificial Intelligence Approach for Covid Period StudyPal
 
Building Data Ecosystems for Accelerated Discovery
Building Data Ecosystems for Accelerated DiscoveryBuilding Data Ecosystems for Accelerated Discovery
Building Data Ecosystems for Accelerated Discovery
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 

Recently uploaded (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 

AI Powered Campus Resource Assistance using Google Dialog Flow

  • 1. 1 ABSTRACT The "AI Powered Campus Resource Assistance" project leverages cutting-edge technologies such as Natural Language Processing (NLP) and Generative AI to enhance campus experiences through an intelligent and conversational interface. Developed on the Google Dialog flow platform, our solution aims to revolutionize the way students and faculty access and interact with campus resources. The system employs NLP to understand and interpret user queries, allowing for seamless communication between users and the AI assistant. Through the integration of Generative AI, the platform goes beyond predefined responses, generating contextually relevant and personalized information tailored to the user's needs. This dynamic approach enables the AI to adapt to various scenarios, providing a more human-like interaction and enhancing user engagement. Key features include real-time assistance with campus navigation, event information, academic queries, and other resource-related inquiries. Users can effortlessly seek information, receive updates, and engage in meaningful conversations, fostering a more connected and informed campus community. By harnessing the power of Google Dialog flow, our project not only streamlines information retrieval but also ensures scalability, accessibility, and ease of integration with existing campus systems. This AI-driven solution represents a significant step toward creating an intelligent, user-centric campus environment, ultimately enhancing the overall educational experience for all stakeholders.
  • 2. 2 CHAPTER 1 INTRODUCTION 1.1 ABOUT THE DOMAIN 1.1.1 ARTIFICIAL INTELLIGENCE Artificial Intelligence (AI) stands at the forefront of technological innovation, representing a paradigm shift in the capabilities of machines. This multidisciplinary field integrates computer science, mathematics, engineering, and cognitive science to create intelligent systems capable of emulating human-like intelligence. The primary objective is to enable machines to learn, reason, and adapt, revolutionizing the way we interact with and leverage the power of technology. At the core of AI lies Machine Learning (ML), which empowers systems to learn from data and improve performance iteratively. Natural Language Processing (NLP) focuses on enabling machines to understand and generate human language, while Computer Vision interprets and processes visual information. Robotics, coupled with AI, leads to the creation of intelligent machines capable of both cognitive and physical tasks. The general problem of simulating (or creating) intelligence has been broken down into sub- problems. These consist of particular traits or capabilities that 2 researchers expect an intelligent system to display. The traits described below have received the most attention and cover the scope of AI research.
  • 3. 3 1.1.2 BIG DATA Big data is a collection of data sets so large and complex that it becomes difficult to process using on-hand database management tools. The challenges include capture, curation, storage, search, sharing, analysis, and visualization. The trend to larger data sets is due to the additional information derivable from analysis of a single large set of related data, as compared to separate smaller sets with the same total amount of data, allowing correlations to be found to "spot business trends, determine quality of research, prevent diseases, link legal citations, combat crime, and determine real-time roadway traffic conditions. Put another way, big data is the realization of greater business intelligence by storing, processing, and analyzing data that was previously ignored due to the limitations of traditional data management technologies. The four dimensions of Big Data • Volume: Large volumes of data • Velocity: Quickly moving data • Variety: structured, unstructured, images, etc. • Veracity: Trust and integrity is a challenge and a must and is important for big data just as for traditional relational DBs • Big Data is about better analytics!
  • 4. 4 1.1.3 MACHINE LEARNING Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to effectively perform a specific task without using explicit instructions, relying on models and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model of sample data, known as "training data", in order to make predictions or decisions without being explicitly programmed to perform the task. Machine learning algorithms are used in the applications of email filtering, detection of network intruders, and computer vision, where it is infeasible to develop an algorithm of specific instructions for performing the task. Machine learning is closely related to computational statistics, which focuses on making predictions using computers. The study of mathematical optimization delivers methods, theory and application domains to the field of machine learning. Data mining is a field of study within machine learning and focuses on exploratory data analysis through unsupervised learning. In its application across business problems, machine learning is also referred to as predictive analytics. Machine learning tasks are classified into several broad categories. In supervised learning, the algorithm builds a mathematical model of a set of data that contains both the inputs and the desired outputs. For example, if the task were determining whether an image contained a certain object, the training data for a supervised learning algorithm would include images with and without that object (the input), and each image would have a label (the output) designating whether it contained the object. In special cases, the input may be only partially available, or restricted to special feedback. Semi algorithms develop mathematical models from incomplete training data, where a portion of the sample inputs are missing the desired output. In unsupervised learning, the algorithm builds a mathematical model of a set of data which contains only inputs and no desired outputs. Unsupervised learning algorithms are used to find structure in the data, like grouping or clustering of data points. Unsupervised learning can discover patterns in the data, and can group the inputs into categories, as in feature learning. Dimensionality reduction is the process of reducing the number of "features", or inputs, in a set of data.
  • 5. 5 1.2 PROBLEMS IN EXISTING SYSTEM In the ever-evolving landscape of academia, efficient communication and instant access to information are the cornerstones of a thriving educational community. Introducing the "College Companion Chatbot" – a revolutionary project aimed at reshaping how we engage with our college environment. The College Companion Chatbot is not just a technological innovation; it's a strategic move towards a more connected and informed college ecosystem. This intelligent solution is crafted to provide an instant and accurate response to a myriad of queries, ensuring every member of our community has seamless access to vital information. Our Project is Powered by Dialog flow, a leading natural language processing platform, our chatbot leverages cutting-edge technology to comprehend diverse user queries. This ensures a robust system capable of understanding and responding to the nuanced needs of our users. User-centric design principles underscore every aspect of the College Companion Chatbot. The interface is crafted to be intuitive, ensuring that users, regardless of technical expertise, can easily navigate and extract valuable information. Whether inquiring about the Head of Department, seeking resource locations, or staying updated on campus events, the College Companion Chatbot serves as a comprehensive information hub. It simplifies complex processes, making information retrieval intuitive and user-friendly. In recent years, the number of student enrollment in educational institutions are increasing day by day. This led tobeing a burden on the administrative staff during admission times. It is impossible to handle all the inquiries posed by the students via the helpdesk Email or chat. Recognizing the dynamic nature of academic institutions, the College Companion Chatbot is adaptive and future ready. Regular updates and planned enhancements will introduce advanced features, ensuring the chatbot remains at the forefront of technological innovation.
  • 6. 6 CHAPTER 2 PROBLEM DEFINITION 2.1 Problem statement 2.1.1 Limited Availability: Students, faculty, and staff often face challenges in accessing crucial information, such as the current Head of Department, location of resources, and details about upcoming events. 2.1.2 Communication Gaps: Communication breakdowns can occur, leading to delays in obtaining necessary details or updates. This can cause the lack of interest to join a particular organization and the will to get benefited. 2.1.3 Complex Resource Location: Locating resources, such as ID cards, past year papers, or specific offices, can be challenging for new and existing students. Manually finding and locating these spots can be time consuming and make us get frustrated. 2.1.4 Language and Accessibility Barriers: Language differences and accessibility barriers can impede effective communication between the college and its diverse community. The are chances for the interpretation of wrong information can occur due to lack of access to college information. 2.1.5 Limited Domain Knowledge: Chatbots often rely on pre-trained data and may lack deep domain-specific knowledge. They may struggle to provide accurate and detailed information on certain topics, especially in specialized domains.
  • 7. 7 2.2 Objectives The objectives of our Campus Assistance bot project include,  To provide quick and efficient customer support 24/7.  To automate the handling of frequently asked questions and basic customer requests.  To improve customer engagement and satisfaction by providing an accessible and convenient way to interact with the organization.  Cater to the diverse language preferences of the college community.  Prioritize user-centric design principles. 2.3 Working The College Companion Chatbot operates as a dynamic and user-centric conversational agent, providing an innovative solution to streamline communication and enhance accessibility within the college community. Leveraging the power of Dialog flow, a leading natural language processing platform, the chatbot excels in understanding and responding to diverse user queries. Users can seamlessly interact with the chatbot through text or voice input, obtaining instant and accurate information on a range of topics. Whether inquiring about the current Head of Department, locating resources on campus, staying informed about upcoming events, or seeking emergency notifications, the chatbot serves as a comprehensive information hub. It bridges communication gaps by delivering real-time announcements, news, and updates to students, faculty, and staff. The chatbot's interface is designed with user-centric principles, ensuring an intuitive and accessible experience for individuals with varying levels of technical expertise. It operates across multiple platforms, including web and mobile, providing users with on-the-go access to its capabilities. By introducing user profiles, the chatbot enables personalization, allowing individuals to tailor their experience and receive personalized information. Regular updates and enhancements ensure the chatbot remains adaptive, future-ready, and at the forefront of technological innovation. Overall, the College Companion Chatbot redefines how the college community communicates, accesses information, and engages within the academic environment.
  • 8. 8 2.4 Existing model Lack of Common-Sense Understanding: Many chatbots struggle with grasping common- sense reasoning and may provide responses that lack contextual understanding or seem nonsensical in certain situations. Handling Ambiguity: Existing models may face difficulties in handling ambiguous queries or requests, leading to responses that lack specificity or fail to address the user's intended meaning. Over-Reliance on Training Data: Models trained on large datasets may inadvertently capture biases present in the data, leading to biased responses or reinforcement of stereotypes. Inability to Ask Clarifying Questions: Existing models may struggle to ask clarifying questions when faced with ambiguous queries. Instead, they might guess the user's intention, potentially leading to misunderstandings. Graph 2.1 The fall in the admission rate of Top institutes From Graph 2.1 we infer that college admission rates drop irrespective of their reputation and achievements. They lack the necessary requirements for college admissions and hence their admission rates drop.
  • 9. 9 2.5 LITERATURE SURVEY [1] Intelligent Agents in Educational Institutions: NEdBOT - NLP-based Chatbot for Administrative Support Using DialogFlow AUTHORS: Muhammad Shahroze Ali, Farooque Azam, Aon Safdar The primary objective of this paper is to examine how a chatbot can decrease the burden on administrative staff during admissions times by automatically providing online assistance on frequently asked questions, student support, and providing quick access to the data. To accomplish this, we created NEdBOT, a chatbot that provides admission information support [2] Chatbot Intent Recognition for College Website using Dialog flow. AUTHORS: Ari Setiaji and Irving V Paputungan This paper successfully explains the implementation of chatbot (ViBOT) using Dialogflow which will give the required information regarding college. With the help of different Integration like Facebook Messenger, web demo amd many more it will create multiple platforms for user. The Dialog flow help us to import and export chat agent which is easier than any other platform. This chatbot will give benefit to the user by saving time and internet usage which is a key of effective chatbot. [3] A Multi-Model and Ai-Based Collegebot Management System (Aicms) For Professional Engineering Colleges AUTHORS: K.Arun, Sri Nagesh, P.Ganga This AICMS bot is an auto AI based college information and interactive system. It trained with all the required college information and regular conversations. Once trained the bot it works always without human intervention. Dialog flow interfaces were implemented to design as the core part without any code. As an interface Facebook is used. The College Bot creates a single conversational platform for the students, staff, and the principal.
  • 10. 10 [4] Chatbot Using Dialog flow and Web Services AUTHORS: A.Alcayde Garcia E. Salmeron-manzano In this project, the author had trained a bot and configure a server to take messages from the user and interpret it and gives back a relevant reply based upon the context and intentions of the user. The bot contacts Zomato using its APIs to get additional information to serve the user for the queries based on the hotels, cuisines., etc.This is possible by understanding the user interaction at a greater level and to understand their various slangs and dialects of the grammar. This makes more convenient and more comfortable for the user to interact. [5] Chatbot with Dialog flow for FAQ Services in Matana University Library AUTHORS: Simon Prananta Barus, Evalien Surijati This chatbot will be continued to the phase of system implementation and maintenance. A chatbot is made more reliable to respond to various items such as providing book descriptions, information on the status of book or book borrowing, handling new member registration, obtaining user satisfaction. [6] AI Based Chatbot for placement activity at college using Dialogflow AUTHORS: Kannadasan R, Prabakaran N, Krishnamoorthy A Authors have reported design and development of AI based Chatbot for handling placement activities in professional college. This agent provides information related to placement activities to students. NLP module of DialogFlow translates students’ queries into structured data in order to understand institute’s service.
  • 11. 11 2.5.1 Consolidated study: The research papers discussed highlight the development and implementation of AI-based chatbots for specific purposes. One focuses on a chatbot designed for library management, addressing tasks like book descriptions, status updates on book borrowing, new member registration, and user satisfaction. The other paper details a chatbot dedicated to handling placement activities in a professional college, offering information related to career placement. In both cases, the integration of Natural Language Processing (NLP) modules, such as DialogFlow, stands out. This technology aids in translating user queries into structured data, enabling the chatbots to comprehend and respond effectively. The training and configuration of the chatbots are key aspects, emphasizing a hands-on approach to development. The papers discuss the practicality of training the bot and configuring a server to ensure seamless communication and relevant responses. External API integration is showcased as a notable feature, with one chatbot connecting to Government APIs to gather additional information. This extends the chatbot's functionality beyond its initial scope, providing users with details about hotels and cuisines. Understanding user interactions, including slangs and dialects, is a shared focus. Both papers aim to make the chatbot interaction more user-friendly, convenient, and comfortable, emphasizing the importance of user-centric design.
  • 12. 12 CHAPTER 3 SOFTWARE REQUIREMENT SPECIFICATION 3.1 What is Software requirement specification? The Software Requirements Specification (SRS) is a comprehensive document outlining the behavior of the system to be developed. It encompasses a set of use cases that thoroughly describe all interactions users will have with the software. In addition to these use cases, the SRS includes non-functional requirements, which impose constraints on the design or implementation, such as performance standards, engineering requirements, quality standards, or design constraints. Software requirements form a crucial subfield of software engineering, dealing with the elicitation, analysis, and specification of all necessary requirements for project development. Developing a clear and thorough understanding of the products to be created is essential for deriving these requirements. Prepared after detailed communication with both the project team and the customer, the Software Requirements Specification serves as a comprehensive description of the intended purpose and environment for the software under development. The report provides a detailed account of what the software is expected to do and how it will perform. A well-crafted SRS defines the interactions of an application and serves as a fundamental document guiding the development process. 3.2 Requirement analysis 3.2.1 Purpose The core objective of this chatbot is to seamlessly integrate advanced technologies, primarily focusing on Natural Language Processing (NLP), to enhance its technical capabilities and user interactions. By incorporating NLP modules such as DialogFlow, the technical aim is to
  • 13. 13 empower the bot to interpret and respond to user queries in a manner that mirrors natural language, fostering a more intuitive and human-like conversational experience. The training and configuration processes are geared towards preparing the bot to understand specific contexts and efficiently handle a diverse range of user queries 3.2.2 Interface requirements This interface should be intuitive and easy to use, allowing users to quickly and easily get the information they need. The interface is customizable to suit the specific needs and goals of the chatbot. Provide an intuitive and user-friendly interface for users to interact with the chatbot. 3.3 Hardware requirements 1. PROCESSOR : Any Mobile Processor Any Computer Processor 2. STORAGE : Minimum 16GB 3. MEMORY : 3GB 3.4 Software Requirements 1. OPERATING SYSTEM : Windows/MacOS/Android/iOS 2. DEVELOPMENT ENVIRONMENT : Google Dialog Flow 3. DATABASE : Google Cloud
  • 14. 14 CHAPTER 4 Architecture 4.1 Proposed System Architecture Fig.4.1 System Architecture for Resource Bot 1. From Fig. 4.1 we theorize that. User sends a request to the bot through DialogFlow Interface 2. The request is received by the Dialogflow, It takes user input, processes it, and determines the appropriate response based on predefined intents, entities, and fulfillment logic. 3. The Dialogflow agent communicates with a fulfillment server. This server hosts the business logic and handles more complex operations that go beyond the capabilities of Dialogflow's built-in features. 4. It can be implemented using cloud functions, a web server, or any backend technology. 5. The fulfillment server may interact with external services or APIs to gather additional information 6. The chatbot can be integrated with various messaging platforms such as Facebook Messenger, Slack, or others, allowing users to interact with the bot through their referred channel. 7.
  • 15. 15 4.2 Conversational AI Chatbot with Task-specific Capabilities.  The user interface module provides an intuitive platform for users to interact with the chatbot. It caters to library-related queries, placement information, and restaurant recommendations.  The Dialogflow module is responsible for natural language understanding. It encompasses intents, entities, and training phrases tailored for library management, placement activities, and restaurant inquiries  The database module is responsible for storing and retrieving data related to library management, ensuring persistence and data continuity across user sessions.  For response generation purposes, it has been categorized it into two blocks, the first one is a Non-Informational Retrieval based intent response, and the second one is an Informational- Retrieval based intent response.  For Non-Informational Retrieval based intent, such as Welcome and Good_Bye, fixed and unchangeable responses are generated.
  • 16. 16 4.3 Model Output Fig. 4.3.1 output for command Cash Counter From fig. 4.3.1 serves a visual aid in understanding the output of the module. It displays the results for the user query in an organized and comprehend manner. The information is presented in a clear and concise format, allowing for an effortless assessment of the output. With just a glance at the figure, one can immediately understand the outcome without any ambiguity.
  • 17. 17 CHAPTER 5 OBJECT ORIENTED ANALYSIS 5.1 Sequence Diagram Fig.5.1 Sequence Diagram for Resource Rover bot The sequence diagram Fig. 5.1.1 for the Resource Rover chat bot begins the process by the message from the user to the NLP bot. Bot sends the http request to the NLP Engine of the complete program which will respond according to the request given by the use. This entire response is further termed as process message and reply will finally be given.
  • 18. 18 5.2 Use Case Diagram: Fig.5.2Use Case Diagram for Resource Rover bot The use case diagram Fig 5.2. for the NLP chatbot that specializes information based queries. The query management is completely managed by administrating system which will also be taking part in maintenance of the response to the request given by the request. The system administrator should also be responsible for linking the chatbot with the data on the Dialogflow so that the user could get the information about his requests regarding the
  • 19. 19 CHAPTER 6 IMPLEMENTATION AND RESULTS 6.1 MODEL DESCRIPTION 1. User Interface Module: Description: The user interface serves as the primary interaction point for users to engage with the Resource Rover. It can be implemented as a web-based chat interface, a mobile app, or integrated with messaging platforms. 2. Dialogflow Module: Description: The Dialogflow module is the core of the Resource Rover, responsible for natural language understanding. It involves setting up intents, entities, and training phrases tailored for educational resource queries. 3. Fulfillment Module: Description: The fulfillment module contains the business logic to process user requests related to educational resources. It interprets and executes commands such as providing information on available courses, recommending study materials, or offering guidance on research topics. 4. Resource Database: Description: This module includes a comprehensive database of educational resources, including courses, books, articles, and other materials. It allows the Resource Rover to retrieve accurate and up-to-date information based on user queries. 5. External Services Integration Module: Description: Integration with external educational platforms and databases enhances the Resource Rover's capabilities. This could involve partnerships with online learning platforms, libraries, or academic databases to fetch additional resources. 6. User Profiling and Personalization: Description: User profiling helps the Resource Rover tailor responses based on individual preferences, learning styles, and academic history. It provides personalized
  • 20. 20 recommendations for courses, study materials, and resources. 7. Security and Privacy Module: Description: Given the sensitivity of educational information, a robust security module ensures the confidentiality and privacy of user data. It may include encryption mechanisms and access controls. 8. Natural Language Generation (NLG): Description: NLG is employed to generate human-like responses, ensuring that the Resource Rover's interactions feel natural and engaging for users. 9. Accessibility Features: Description: To ensure inclusivity, the Resource Rover includes accessibility features, such as compatibility with screen readers and adherence to accessibility standards. 10. Continuous Learning Module: Description: The chatbot incorporates mechanisms for continuous learning. User feedback and interactions contribute to improving the chatbot's responses and expanding its knowledge base over time.
  • 21. 21 6.2 IMPLEMENTATION SCREENSHOT Fig 6.2.1 Implementation of existing solution The above Fig 6.2.1 portraits the command of the existing work related to the admission related query in the college. Where we could see that the question raised as “Give me the admission wing details”.The reply is like “The Admission wing is present at the admin block, you can contact at +91 9442343439 for admission related queries”
  • 22. 22 Fig 6.2.2 Implementation of Proposed solution The above Fig 6.2.2 portraits the command of the proposed work related to the resource related query in the college. Where we could see that the question raised as “Who is the hod of CSBS”.The reply is like “The Head of Department of CSBS is Dr.N.Danapaquime.”
  • 23. 23 6.3 COMPARISON BETWEEN EXISTING MODEL AND PROPOSED MODEL Performance Metric Achieved Results F1-Score 76.5% Accuracy 76.8% Precision 76.3% Table 6.3.1 Existing work’s Intent classification results Performance Metric Achieved Results F1-Score 78.465% Accuracy 76.95% Precision 80.3% Table 6.3.2 Proposed work’s Intent classification results In the existing work, the intent classification achieved an F1-Score of 76.5%, an Accuracy of 76.8%, and a Precision of 76.3%. These results indicate a robust performance in accurately identifying and classifying user intents within the given context. Comparatively, the achieved results in the present study exhibit an even higher level of accuracy, with an F1- Score of 78.465%, an Accuracy of 76.95%, and a Precision of 80.3%. This improvement suggests advancements in the intent classification model, resulting in a more precise and reliable system for discerning user intentions
  • 24. 24 CHAPTER 7 CONCLUSION AND FUTURESCOPE 7.1 Conclusion In conclusion, this Resource chatbot for college related questions might offer a practical and approachable manner for students to acquire the details they require regarding the admissions process. It allows students to ask questions and receive answers in real-time, eliminating the need for phone calls or in-person visits. The chat bot can also provide a consistent and standardized source of information, ensuring that all prospective students receive the same information, regardless of who they speak to. By providing a user-friendly and efficient means of communicating with the university, the chat bot can help to streamline the resource related things and improve the overall experience for prospective students. Chatbots may inadvertently generate content that is inappropriate, offensive, or violates ethical standards, as they learn from the data they are trained on, which can sometimes include biased or harmful language.
  • 25. 25 7.2 Future Scope The future scope of chat bots, especially in the area of admission queries, is promising some possible directions are. Personalization: Chat bot can be programmed to personalize their responses based on the user's previous interactions, providing a more tailored experience for each student. Multi-language support: This Chat bot can be designed to support multiple languages, making them accessible to a wider range of students. Artificial intelligence and machine learning: Advancements in artificial intelligence and machine learning can allow chat bots to become more intelligent and provide more sophisticated answers to students' questions. Automation of administrative tasks: This bots can be used to automate administrative tasks, such as processing applications or sending reminders, freeing up staff time for more complex tasks. Voice Recognition and Synthesis: Introduce voice recognition capabilities to allow users to interact with the chatbot using voice commands. Additionally, implement voice synthesis to enable the chatbot to respond in a natural-sounding voice.
  • 26. 26 7.3 REFERENCES  Hafiz M 2015 ELISA: E-Learning Integrated Short Announcement Colloquium in Computer and Math. Sci. Education p 110. ," 2019 IEEE Conference on Systems, Process and Control (ICSPC)  Intelligent Agents in Educational Institutions: NEdBOT - NLP-based Chatbot for Administrative Support Using DialogFlow.  Pinto R 2014 Secure Instant Messaging Master Thesis (Department of Computer Science and Engineering, Frankfurt University).  Design of Bots for Campus Information Sharin March 2018 (IOP Conference Series Materials Science Engineering) 325(1):01200DOI: 10.1088/1757- 899X/325/1/012005 WEB REFERENCES: https://dialogflow.cloud.google.com/ https://dialogflow.cloud.google.com/#/agent/vamsrikrishnas-99qo/intents  https://en.m.wikipedia.org/wiki/ https://python-telegram-bot.org/ https://ieeexplore.ieee.org/document/9999103/authors#authors
  • 27. 27 APPENDIX I SCREENSHOTS Fig I [2] response for EEE Department query Fig II Response for staff search
  • 28. 28 Fig III response for Department Location
  • 29. 29 APPENDIXB SAMPLE IMPLEMENTATION: Fig I. Implementation details intent
  • 30. 30 Fig II. Implementation for achievements entity Fig III. Information intents
  • 31. 31 Fig iv. Embedding with Webpage HTML CODE FOR INTEGRATING WITH THE COLLEGE WEBSITE: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>College Chatbot</title> <!-- Add the Dialogflow Web Chat script --> <script src="https://www.gstatic.com/dialogflow-console/fast/messenger/bootstrap.js?v=1"></script> <script> // Replace YOUR_PROJECT_ID with your Dialogflow project ID const projectId = 'YOUR_PROJECT_ID'; const chatbotElement = document.querySelector('#chatbot'); window.dfMessenger = new window.dfuse({ chatId: projectId, config: {
  • 32. 32 location: 'us-central1', }, }); // Embed the chat widget dfMessenger.render(chatbotElement); </script> </head> <body> <h1>Welcome to Our College</h1> <p>Ask the chatbot any questions you have!</p> <!-- Container for the Dialogflow Web Chat widget --> <div id="chatbot"></div> </body> </html> JAVA SCRIPT: const projectId = 'YOUR_PROJECT_ID'; // Replace with your Dialogflow project ID const sessionId = '123456'; // Replace with a unique session ID const languageCode = 'en'; // Replace with the language code of your Dialogflow agent $(document).ready(function () { // Initialize the Dialogflow client const apiEndpoint = 'https://dialogflow.googleapis.com/v2/projects/' + projectId + '/agent/sessions/' + sessionId + ':detectIntent'; // Function to send a message to Dialogflow window.sendMessage = function () { const userMessage = $('#user-input').val(); if (userMessage.trim() === '') return; displayMessage('User: ' + userMessage, 'user');
  • 33. 33 // Make a request to Dialogflow $.ajax({ type: 'POST', url: apiEndpoint, contentType: 'application/json; charset=utf-8', dataType: 'json', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', // Replace with your Dialogflow API access token }, data: JSON.stringify({ queryInput: { text: { text: userMessage, languageCode: languageCode, }, }, }), success: function (response) { const fulfillmentText = response.queryResult.fulfillmentText; displayMessage('Bot: ' + fulfillmentText, 'bot'); }, error: function () { displayMessage('Error communicating with Dialogflow.', 'bot'); }, }); // Clear the input field $('#user-input').val(''); }; // Function to display a message in the chat function displayMessage(message, sender) {
  • 34. 34 const chatDiv = $('#chat'); const newMessage = $('<div class="' + sender + '-message">').text(message); chatDiv.append(newMessage); // Scroll to the bottom of the chat chatDiv.scrollTop(chatDiv.prop('scrollHeight')); } }); CSS CODE: body { font-family: Arial, sans-serif; } #chat-container { max-width: 400px; margin: 20px auto; padding: 20px; border: 1px solid #ccc; border-radius: 5px; } #chat { height: 200px; overflow-y: scroll; border: 1px solid #ddd; padding: 10px; margin-bottom: 10px; } .user-message { color: #0066cc;