Declare prepareOpenAIMessages as synchronous
As there is no need for the function o be async anymore.
This commit is contained in:
parent
6c25211f0a
commit
6e37db2fb3
|
@ -2795,7 +2795,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||
generate_data = getNovelGenerationData(finalPromt, this_settings, this_amount_gen, isImpersonate);
|
||||
}
|
||||
else if (main_api == 'openai') {
|
||||
let [prompt, counts] = await prepareOpenAIMessages({
|
||||
let [prompt, counts] = prepareOpenAIMessages({
|
||||
name2: name2,
|
||||
charDescription: charDescription,
|
||||
charPersonality: charPersonality,
|
||||
|
|
|
@ -522,9 +522,9 @@ function populateChatCompletion (prompts, chatCompletion, {bias, quietPrompt, ty
|
|||
* @param {string} options.type - The type of the chat, can be 'impersonate'.
|
||||
* @param {string} options.quietPrompt - The quiet prompt to be used in the conversation.
|
||||
* @param {Array} options.extensionPrompts - An array of additional prompts.
|
||||
* @returns {Promise<Array>} An array where the first element is the prepared chat and the second element is a boolean flag.
|
||||
* @returns {(*[]|boolean)[]} An array where the first element is the prepared chat and the second element is a boolean flag.
|
||||
*/
|
||||
async function prepareOpenAIMessages({
|
||||
function prepareOpenAIMessages({
|
||||
name2,
|
||||
charDescription,
|
||||
charPersonality,
|
||||
|
|
Loading…
Reference in New Issue