You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keywords: ["who is affan","what affan does","about affan","affan asghar","md affan asghar"],
114
-
response: "MD Affan Asghar is a passionate Full Stack Web Developer and Computer Science Engineering student, dedicated to building beautiful, responsive, and user-friendly websites. 💻🚀"
115
-
},
116
-
{keywords: ["your name","who are you","creator","made you","built you","build"],response: "I'm a chatbot created by MD Affan Asghar. 😊"},
117
-
{keywords: ["developer name","who made you","who is your developer"],response: "My developer is MD Affan Asghar. 🚀"},
118
-
{keywords: ["phone number","contact","mobile","phone"],response: "You can contact MD Affan Asghar at 📞 9339828230."},
119
-
{keywords: ["email","mail","gmail"],response: "You can reach him at 📧 affanasgar8@gmail.com."},
120
-
{keywords: ["address","location","where do you live"],response: "He lives at 🏠 Kankinara, Kolkata, West Bengal."},
121
-
{keywords: ["skills","expertise","technologies","tech stack"],response: "He is skilled in 🔥 Full-Stack Web Development, Node.js, React, Php, MySQL MongoDB, Express.js, JavaScript, HTML, CSS, and more!"},
122
-
{keywords: ["projects","work","portfolio","project"],response: "His projects include 🎯 WanderLust-Holidays-Rental-Homes, Simtrak Solution, IVMS, and a Weather App using React. 🚀"},
123
-
{keywords: ["portfolio","website","profile"],response: "Check out his portfolio here: 🌐 (Provide your portfolio link)."},
124
-
{keywords: ["college","education","study","degree"],response: "He is currently pursuing B.Tech in Computer Science Engineering (CSE) at 🏫 Narula Institute of Technology."},
125
-
{keywords: ["internship","experience","job"],response: "He worked as a Web Developer Intern at 💼 Simtrak Solution Pvt Ltd."},
126
-
{keywords: ["final year project","academic project"],response: "His final year project is a full-stack web development project that aims to revolutionize the industry. 🚀"},
127
-
{keywords: ["hobbies","interests","passion"],response: "He loves 💻 coding, designing beautiful websites, learning new tech, and contributing to open-source projects. 🚀"},
128
-
{keywords: ["social media","linkedin","github"],response: "You can connect with him here:\n🔗 LinkedIn: https://linkedin.com/in/mdaffanasghar/\n🐱 GitHub: https://github.com/affancoder"},
129
-
{keywords: ["career","future plans","goal"],response: "His goal is to become a highly skilled full-stack developer and work on innovative tech projects. 🚀"},
130
-
{keywords: ["freelance","hire","services"],response: "Yes! He is available for freelance projects. Contact him at 📧 affanasgar8@gmail.com."},
131
-
{keywords: ["hi","hello","hey","hii"],response: "Hello! How can I assist you today? 😊"},
132
-
{keywords: ["bye","goodbye","see you"],response: "Goodbye! Have a great day! 😊"},
117
+
{
118
+
keywords: [
119
+
"who is affan",
120
+
"what affan does",
121
+
"about affan",
122
+
"affan asghar",
123
+
"md affan asghar",
124
+
"tell me about affan",
125
+
"who are you",
126
+
],
127
+
response:
128
+
"MD Affan Asghar is a passionate Full Stack Web Developer and Computer Science Engineering student, dedicated to building beautiful, responsive, and user-friendly websites. 💻🚀",
129
+
},
130
+
{
131
+
keywords: ["your name","creator","made you","built you","build","who created you"],
132
+
response: "I'm a chatbot created by MD Affan Asghar. 😊",
133
+
},
134
+
{
135
+
keywords: ["developer name","who made you","who is your developer"],
136
+
response: "My developer is MD Affan Asghar. 🚀",
137
+
},
138
+
{
139
+
keywords: ["phone number","contact","mobile","phone","how to contact","reach affan"],
140
+
response: "You can contact MD Affan Asghar at 📞 9339828230.",
content: "You are an assistant that answers questions specifically about MD Affan Asghar, a Full Stack Developer. Keep responses brief (1-2 sentences max) and relevant to Affan's skills, projects, education, or contact info. If the question isn't about Affan, politely decline to answer."
266
+
},
267
+
{
268
+
role: "user",
269
+
content: userMessage
270
+
}
271
+
],
272
+
temperature: 0.3,// Lower temperature for more focused answers
273
+
max_tokens: 100
274
+
}),
275
+
timeout: 5000// Add timeout
276
+
});
277
+
278
+
if(!response.ok){
279
+
thrownewError(`API request failed with status ${response.status}`);
280
+
}
281
+
282
+
constdata=awaitresponse.json();
283
+
284
+
if(!data.choices?.[0]?.message?.content){
285
+
thrownewError("Invalid API response structure");
286
+
}
287
+
288
+
returndata.choices[0].message.content;
289
+
}catch(error){
290
+
console.error("DeepSeek API error:",error);
291
+
returnnull;// Return null to trigger local fallback
0 commit comments