diff --git a/public/scripts/reasoning.js b/public/scripts/reasoning.js index da11b47a3..2a8e9f73e 100644 --- a/public/scripts/reasoning.js +++ b/public/scripts/reasoning.js @@ -1075,7 +1075,7 @@ export function removeReasoningFromString(str) { * @param {boolean} [options.strict=true] Whether the reasoning block **has** to be at the beginning of the provided string (excluding whitespaces), or can be anywhere in it * @returns {ParsedReasoning|null} Parsed reasoning block and message content */ -function parseReasoningFromString(str, { strict = true } = {}) { +export function parseReasoningFromString(str, { strict = true } = {}) { // Both prefix and suffix must be defined if (!power_user.reasoning.prefix || !power_user.reasoning.suffix) { return null; diff --git a/public/scripts/st-context.js b/public/scripts/st-context.js index 27eaf77af..9680315f1 100644 --- a/public/scripts/st-context.js +++ b/public/scripts/st-context.js @@ -79,7 +79,7 @@ import { timestampToMoment, uuidv4 } from './utils.js'; import { getGlobalVariable, getLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js'; import { convertCharacterBook, loadWorldInfo, saveWorldInfo, updateWorldInfoList } from './world-info.js'; import { ChatCompletionService, TextCompletionService } from './custom-request.js'; -import { updateReasoningUI } from './reasoning.js'; +import { updateReasoningUI, parseReasoningFromString } from './reasoning.js'; export function getContext() { return { @@ -213,6 +213,7 @@ export function getContext() { ChatCompletionService, TextCompletionService, updateReasoningUI, + parseReasoningFromString, unshallowCharacter, unshallowGroupMembers, };