mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-26 13:18:51 +01:00
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:
parent
791b515937
commit
4beb06aa4b
10 changed files with 125 additions and 78 deletions
|
|
@ -36,7 +36,7 @@ const cleanupPreset = ({ preset: _preset, endpointsConfig = {} }) => {
|
|||
jailbreak: _preset?.jailbreak ?? false,
|
||||
context: _preset?.context ?? null,
|
||||
systemMessage: _preset?.systemMessage ?? null,
|
||||
toneStyle: _preset?.toneStyle ?? 'fast',
|
||||
toneStyle: _preset?.toneStyle ?? 'creative',
|
||||
title: _preset?.title ?? 'New Preset'
|
||||
};
|
||||
} else if (endpoint === 'chatGPTBrowser') {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const buildDefaultConversation = ({
|
|||
jailbreak: lastConversationSetup?.jailbreak ?? false,
|
||||
context: lastConversationSetup?.context ?? null,
|
||||
systemMessage: lastConversationSetup?.systemMessage ?? null,
|
||||
toneStyle: lastConversationSetup?.toneStyle ?? 'fast',
|
||||
toneStyle: lastConversationSetup?.toneStyle ?? 'creative',
|
||||
jailbreakConversationId: lastConversationSetup?.jailbreakConversationId ?? null,
|
||||
conversationSignature: null,
|
||||
clientId: null,
|
||||
|
|
@ -80,7 +80,7 @@ const buildDefaultConversation = ({
|
|||
return conversation;
|
||||
};
|
||||
|
||||
const getDefaultConversation = ({ conversation, prevConversation, endpointsConfig, preset }) => {
|
||||
const getDefaultConversation = ({ conversation, endpointsConfig, preset }) => {
|
||||
const { endpoint: targetEndpoint } = preset || {};
|
||||
|
||||
if (targetEndpoint) {
|
||||
|
|
@ -123,7 +123,9 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsConfi
|
|||
conversation = buildDefaultConversation({ conversation, endpoint, endpointsConfig });
|
||||
return conversation;
|
||||
}
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
// if anything happens, reset to default model
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const useMessageHandler = () => {
|
|||
jailbreak: currentConversation?.jailbreak ?? false,
|
||||
systemMessage: currentConversation?.systemMessage ?? null,
|
||||
context: currentConversation?.context ?? null,
|
||||
toneStyle: currentConversation?.toneStyle ?? 'fast',
|
||||
toneStyle: currentConversation?.toneStyle ?? 'creative',
|
||||
jailbreakConversationId: currentConversation?.jailbreakConversationId ?? null,
|
||||
conversationSignature: currentConversation?.conversationSignature ?? null,
|
||||
clientId: currentConversation?.clientId ?? null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue