mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into reasoning-parsing-streaming
This commit is contained in:
@ -5931,6 +5931,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
|
||||
chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
|
||||
chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
|
||||
chat[chat.length - 1]['extra']['reasoning'] = reasoning;
|
||||
chat[chat.length - 1]['extra']['reasoning_duration'] = null;
|
||||
if (power_user.message_token_count_enabled) {
|
||||
const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];
|
||||
chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);
|
||||
@ -5953,6 +5954,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
|
||||
chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
|
||||
chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
|
||||
chat[chat.length - 1]['extra']['reasoning'] = reasoning;
|
||||
chat[chat.length - 1]['extra']['reasoning_duration'] = null;
|
||||
if (power_user.message_token_count_enabled) {
|
||||
const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];
|
||||
chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);
|
||||
@ -5972,6 +5974,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
|
||||
chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
|
||||
chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
|
||||
chat[chat.length - 1]['extra']['reasoning'] += reasoning;
|
||||
// We don't know if the reasoning duration extended, so we don't update it here on purpose.
|
||||
if (power_user.message_token_count_enabled) {
|
||||
const tokenCountText = (reasoning || '') + chat[chat.length - 1]['mes'];
|
||||
chat[chat.length - 1]['extra']['token_count'] = await getTokenCountAsync(tokenCountText, 0);
|
||||
@ -5991,6 +5994,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
|
||||
chat[chat.length - 1]['extra']['api'] = getGeneratingApi();
|
||||
chat[chat.length - 1]['extra']['model'] = getGeneratingModel();
|
||||
chat[chat.length - 1]['extra']['reasoning'] = reasoning;
|
||||
chat[chat.length - 1]['extra']['reasoning_duration'] = null;
|
||||
if (power_user.trim_spaces) {
|
||||
getMessage = getMessage.trim();
|
||||
}
|
||||
|
Reference in New Issue
Block a user