diff --git a/app/imports/startup/server/FetchEmbedForUser.js b/app/imports/startup/server/FetchEmbedForUser.js index 7600114..7ef984d 100644 --- a/app/imports/startup/server/FetchEmbedForUser.js +++ b/app/imports/startup/server/FetchEmbedForUser.js @@ -108,7 +108,7 @@ function getRelevantContextFromDB(userEmbedding) { filename: article.filename, question: article.question, article_text: article.article_text, - freq: 0, + freq: article.freq, })); return { diff --git a/app/imports/ui/components/Chatbot.jsx b/app/imports/ui/components/Chatbot.jsx index 1415f87..728219f 100644 --- a/app/imports/ui/components/Chatbot.jsx +++ b/app/imports/ui/components/Chatbot.jsx @@ -24,7 +24,7 @@ const ChatBox = (props) => { const freq = item.freq + amount; AskUs.collection.update(_id, { $set: { freq } }, (error) => (error ? console.log('Error', error.message) : - console.log(/* 'Success', `increased ${filename} freq by ${amount}` */))); + console.log(/* 'Success', `increased ${item.filename} freq by ${amount} (from ${item.freq} to ${freq})` */))); }; const handleSend = (e) => { diff --git a/app/imports/ui/components/SimilarArticles.jsx b/app/imports/ui/components/SimilarArticles.jsx index ff829fb..d4ca1f6 100644 --- a/app/imports/ui/components/SimilarArticles.jsx +++ b/app/imports/ui/components/SimilarArticles.jsx @@ -7,7 +7,7 @@ const SimilarArticles = ({ similarArticles }) => ( {similarArticles.slice(0, 3).map((article) => { const truncatedContent = `${article.article_text.substring(0, 500)}...`; return ( - {/* Ensure the key here is unique for each article */} + {/* Ensure the key here is unique for each article */}
{article.question}
diff --git a/app/imports/ui/components/UHNavbar.jsx b/app/imports/ui/components/UHNavbar.jsx index 21934de..39890a3 100644 --- a/app/imports/ui/components/UHNavbar.jsx +++ b/app/imports/ui/components/UHNavbar.jsx @@ -75,7 +75,7 @@ const UHNavbar = () => (