Commit d245b756 authored by Andrew Ryan's avatar Andrew Ryan
Browse files

Add wait for tick before scrolling down in openai

We had this wait on ollama but not for openai, causing it to fail
to scroll down in certain cases.

This fixes the issue.
parent ac294a74
...@@ -517,6 +517,10 @@ ...@@ -517,6 +517,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
......
...@@ -527,6 +527,10 @@ ...@@ -527,6 +527,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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment