Skip to content

Commit

Permalink
Update: Enhanced app functionalities (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed May 31, 2024
1 parent e0c43f5 commit cc4ff00
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions MovieVerse-Frontend/js/chatbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ function removeMarkdown(text) {
}

function getAIResponse() {
const encodedKey = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(encodedKey);
const response = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(response);
}

function showSpinner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ header h1 {
}

.modal-visible {
display: flex;
display: flex !important;
}

.pin-btn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ <h4 id="alt-title" style="font-weight: normal; font-size: 15px; color: #ff8623">

<div id="myModal" class="modal-overlay">
<div class="spinner"></div>
<p style="color: white; margin-left: 10px">Loading response...</p>
</div>

<footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ async function movieVerseResponse(message) {
let fullGeminiResponse = '';
for await (const chunk of fetchGeminiResponse(message)) {
if (chunk === null) {
return "An error occurred while generating the response due to high traffic. Please try again later.";
return "An error occurred while generating the response due to high traffic on our site. We apologize for the inconvenience. Please try again later.";
}
else {
fullGeminiResponse += chunk;
Expand All @@ -639,8 +639,8 @@ function removeMarkdown(text) {
}

function getAIResponse() {
const encodedKey = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(encodedKey);
const response = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(response);
}

function showSpinner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ header h1 {
}

.modal-visible {
display: flex;
display: flex !important;
}

.pin-btn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ <h4 id="alt-title" style="font-weight: normal; font-size: 15px; color: #ff8623">

<div id="myModal" class="modal-overlay">
<div class="spinner"></div>
<p style="color: white; margin-left: 10px">Loading response...</p>
</div>

<footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ async function movieVerseResponse(message) {
let fullGeminiResponse = '';
for await (const chunk of fetchGeminiResponse(message)) {
if (chunk === null) {
return "An error occurred while generating the response due to high traffic. Please try again later.";
return "An error occurred while generating the response due to high traffic on our site. We apologize for the inconvenience. Please try again later.";
}
else {
fullGeminiResponse += chunk;
Expand All @@ -639,8 +639,8 @@ function removeMarkdown(text) {
}

function getAIResponse() {
const encodedKey = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(encodedKey);
const response = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(response);
}

function showSpinner() {
Expand Down
4 changes: 2 additions & 2 deletions MovieVerse-Mobile/www/MovieVerse-Frontend/js/chatbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ function removeMarkdown(text) {
}

function getAIResponse() {
const encodedKey = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(encodedKey);
const response = 'QUl6YVN5Q1RoUWVFdmNUb01ka0NqWlM3UTNxNzZBNUNlNjVyMW9r';
return atob(response);
}

function showSpinner() {
Expand Down

0 comments on commit cc4ff00

Please sign in to comment.