Declare prepareOpenAIMessages as synchronous

As there is no need for the function o be async anymore.
This commit is contained in:
maver
2023-06-24 19:54:16 +02:00
parent 6e37db2fb3
commit 2f4424e6c6
2 changed files with 9 additions and 9 deletions

View File

@ -571,7 +571,7 @@ function prepareOpenAIMessages({
if (authorsNote && authorsNote.content) mappedPrompts.push({role: 'system', content: authorsNote.content, identifier: 'authorsNote'});
// Create prompt objects and substitute markers
mappedPrompts.forEach((prompt) => {
mappedPrompts.forEach(prompt => {
const newPrompt = promptManager.preparePrompt(prompt);
const markerIndex = prompts.index(prompt.identifier);