Fix Palm when streaming is enabled

This commit is contained in:
Cohee 2023-09-25 20:24:56 +03:00
parent 01f14b461f
commit 3e29d39f05
1 changed files with 1 additions and 1 deletions

View File

@ -1191,7 +1191,7 @@ async function sendOpenAIRequest(type, openai_msgs_tosend, signal) {
const isTextCompletion = oai_settings.chat_completion_source == chat_completion_sources.OPENAI && textCompletionModels.includes(oai_settings.openai_model); const isTextCompletion = oai_settings.chat_completion_source == chat_completion_sources.OPENAI && textCompletionModels.includes(oai_settings.openai_model);
const isQuiet = type === 'quiet'; const isQuiet = type === 'quiet';
const isImpersonate = type === 'impersonate'; const isImpersonate = type === 'impersonate';
const stream = oai_settings.stream_openai && !isQuiet && !isScale && !isAI21; const stream = oai_settings.stream_openai && !isQuiet && !isScale && !isAI21 && !isPalm;
if (isAI21 || isPalm) { if (isAI21 || isPalm) {
const joinedMsgs = openai_msgs_tosend.reduce((acc, obj) => { const joinedMsgs = openai_msgs_tosend.reduce((acc, obj) => {