Skip to content

Commit

Permalink
Removed fixed Response from chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadfadhli committed Oct 31, 2024
1 parent 4061b1c commit db8c44e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions frontend/iQMA-Skills-Builder/app/screens/Chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,18 @@ export const loadChatHistory = async (userId: string, sectionId: string) => {
}))
);

const fixedResponse = [
{
isUser: false,
text: `Hello! How can I assist you with ${sectionMapping[sectionId]}?`,
},
];

return formattedChatHistory.length > 0
? fixedResponse.concat(formattedChatHistory, fixedResponse)
: fixedResponse;
// const fixedResponse = [
// {
// isUser: false,
// text: `Hello! How can I assist you with ${sectionMapping[sectionId]}?`,
// },
// ];

// return formattedChatHistory.length > 0
// ? fixedResponse.concat(formattedChatHistory, fixedResponse)
// : fixedResponse;

return formattedChatHistory;
} catch (error) {
console.error('Error while loading chat history:', error);
}
Expand Down

0 comments on commit db8c44e

Please sign in to comment.