Skip to content

Commit 81ff7e7

Browse files
utilities
1 parent e1009e2 commit 81ff7e7

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

chatbotLogic.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import { ChatbotResponse } from '../types';
2+
3+
const collegeData = {
4+
admission: {
5+
process: "The admission process at ADGIPS involves:\n1. Online application\n2. Merit-based selection\n3. Document verification\n4. Fee payment",
6+
courses: "We offer:\n- B.Tech (CSE, IT, ECE)\n- BBA\n- MBA",
7+
fees: "Fee structure varies by course. Please visit our website for detailed information.",
8+
},
9+
academics: {
10+
departments: ["Computer Science", "Information Technology", "Electronics", "Management"],
11+
faculty: "We have highly qualified faculty members with extensive industry and academic experience.",
12+
facilities: "Modern labs, Digital library, Wi-Fi campus, Sports facilities",
13+
},
14+
contact: {
15+
address: "FC-26, Shastri Park, Delhi-110053",
16+
phone: "+91-11-22484566",
17+
email: "info@adgips.ac.in",
18+
},
19+
};
20+
21+
export function generateResponse(input: string): ChatbotResponse {
22+
const lowercaseInput = input.toLowerCase();
23+
24+
// Admission related queries
25+
if (lowercaseInput.includes('admission') || lowercaseInput.includes('apply')) {
26+
return {
27+
content: collegeData.admission.process,
28+
links: ['https://adgips.ac.in/admissions']
29+
};
30+
}
31+
32+
// Course related queries
33+
if (lowercaseInput.includes('course') || lowercaseInput.includes('program')) {
34+
return {
35+
content: collegeData.admission.courses,
36+
links: ['https://adgips.ac.in/courses']
37+
};
38+
}
39+
40+
// Fee related queries
41+
if (lowercaseInput.includes('fee') || lowercaseInput.includes('payment')) {
42+
return {
43+
content: collegeData.admission.fees,
44+
links: ['https://adgips.ac.in/fees']
45+
};
46+
}
47+
48+
// Contact related queries
49+
if (lowercaseInput.includes('contact') || lowercaseInput.includes('location')) {
50+
return {
51+
content: `You can reach us at:\n${collegeData.contact.address}\nPhone: ${collegeData.contact.phone}\nEmail: ${collegeData.contact.email}`,
52+
links: ['https://adgips.ac.in/contact']
53+
};
54+
}
55+
56+
// Faculty or department related queries
57+
if (lowercaseInput.includes('faculty') || lowercaseInput.includes('department')) {
58+
return {
59+
content: collegeData.academics.faculty + "\n\nOur departments: " + collegeData.academics.departments.join(", "),
60+
links: ['https://adgips.ac.in/faculty']
61+
};
62+
}
63+
64+
// Default response
65+
return {
66+
content: "I'm here to help you with information about ADGIPS. You can ask me about admissions, courses, fees, faculty, or contact information. How may I assist you?",
67+
};
68+
}

0 commit comments

Comments
 (0)