Feature #3593
FE - Support for global answer count
Status:
New
Priority:
High
Assignee:
-
Start date:
06/05/2024
Due date:
% Done:
0%
Estimated time:
0.50 h
Description
We need to mention "Happily served <num> answers" under the chat interface. Today, <num> starts from zero when the page is loaded. However, this needs to count all answers ever served.
-When page is loaded, show the empty screen as usual.
-do the following in the background
--threadAnswerCount = get it from local storage (First time, it will be zero)
--send an call_openai_api gcf call with empty message and threadAnswerCount.
When you get the call_openai_api response (above or any future call), update threadAnswerCount and localStorage with answerCount
--if threadAnswerCount is non-zero, show "Happily served <threadAnswerCount> answers"