Minor fixes: tokenizer, default Bing toneStyle, SiblingSwitch (#348)

* fix: tokenizer will count completion tokens correctly, remove global var, will allow unofficial models for alternative endpoints

* refactor(askBingAI.js, Settings.jsx, types.ts, cleanupPreset.js, getDefaultConversation.js, handleSubmit.js): change default toneStyle to 'creative' instead of 'fast' for Bing AI endpoint.

* fix(SiblingSwitch): correctly appears now
style(HoverButtons.jsx): add 'active' class to hover buttons
This commit is contained in:
Danny Avila 2023-05-21 12:43:06 -04:00 committed by GitHub
parent 791b515937
commit 4beb06aa4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 125 additions and 78 deletions

View file

@ -40,7 +40,7 @@ router.post('/', requireJwtAuth, async (req, res) => {
jailbreakConversationId: req.body?.jailbreakConversationId ?? null,
systemMessage: req.body?.systemMessage ?? null,
context: req.body?.context ?? null,
toneStyle: req.body?.toneStyle ?? 'fast',
toneStyle: req.body?.toneStyle ?? 'creative',
token: req.body?.token ?? null
};
else
@ -51,7 +51,7 @@ router.post('/', requireJwtAuth, async (req, res) => {
conversationSignature: req.body?.conversationSignature ?? null,
clientId: req.body?.clientId ?? null,
invocationId: req.body?.invocationId ?? null,
toneStyle: req.body?.toneStyle ?? 'fast',
toneStyle: req.body?.toneStyle ?? 'creative',
token: req.body?.token ?? null
};
@ -110,7 +110,7 @@ const ask = async ({
try {
let lastSavedTimestamp = 0;
const { onProgress: progressCallback, getPartialText } = createOnProgress({
const { onProgress: progressCallback } = createOnProgress({
onProgress: ({ text }) => {
const currentTimestamp = Date.now();
if (currentTimestamp - lastSavedTimestamp > 500) {