mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Declare prepareOpenAIMessages as synchronous
As there is no need for the function o be async anymore.
This commit is contained in:
@ -2795,7 +2795,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
generate_data = getNovelGenerationData(finalPromt, this_settings, this_amount_gen, isImpersonate);
|
generate_data = getNovelGenerationData(finalPromt, this_settings, this_amount_gen, isImpersonate);
|
||||||
}
|
}
|
||||||
else if (main_api == 'openai') {
|
else if (main_api == 'openai') {
|
||||||
let [prompt, counts] = await prepareOpenAIMessages({
|
let [prompt, counts] = prepareOpenAIMessages({
|
||||||
name2: name2,
|
name2: name2,
|
||||||
charDescription: charDescription,
|
charDescription: charDescription,
|
||||||
charPersonality: charPersonality,
|
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.type - The type of the chat, can be 'impersonate'.
|
||||||
* @param {string} options.quietPrompt - The quiet prompt to be used in the conversation.
|
* @param {string} options.quietPrompt - The quiet prompt to be used in the conversation.
|
||||||
* @param {Array} options.extensionPrompts - An array of additional prompts.
|
* @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,
|
name2,
|
||||||
charDescription,
|
charDescription,
|
||||||
charPersonality,
|
charPersonality,
|
||||||
|
Reference in New Issue
Block a user