Merge pull request #1311 from AndrewRyanChama/arc/openaitick

Add wait for tick before scrolling down in openai
This commit is contained in:
Timothy Jaeryang Baek 2024-03-26 21:51:04 -07:00 committed by GitHub
commit 7d45d2762f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -518,6 +518,10 @@
const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => { const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => {
const responseMessage = history.messages[responseMessageId]; const responseMessage = history.messages[responseMessageId];
// Wait until history/message have been updated
await tick();
scrollToBottom(); scrollToBottom();
const docs = messages const docs = messages

View file

@ -533,6 +533,10 @@
const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => { const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => {
const responseMessage = history.messages[responseMessageId]; const responseMessage = history.messages[responseMessageId];
// Wait until history/message have been updated
await tick();
scrollToBottom(); scrollToBottom();
const docs = messages const docs = messages