mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-03 00:58:50 +01:00
Fix: Azure "user_provided" Frontend Credentials and Save Last Selected Bing Settings (#587)
* fix(Messages.jsx): fix <body> tag warning * fix(NewConversationMenu): update localStorage with lastBingSettings when endpoint is 'bingAI' fix(getDefaultConversation): retrieve lastBingSettings from localStorage and use it to set default values for jailbreak and toneStyle when endpoint is 'bingAI' feat(settings.spec.js): add test to check if the active class is set on the selected endpoint in the settings menu * fix(BingAIOptions): add data-testid to BingAIOptions SelectDropDown component fix(settings.spec.js): update test to include additional steps for testing settings persistence * fix(azure): support user_provided credentials from client
This commit is contained in:
parent
04e4259005
commit
75250f3a5f
7 changed files with 76 additions and 15 deletions
|
|
@ -6,6 +6,7 @@ const buildDefaultConversation = ({
|
|||
}) => {
|
||||
const lastSelectedModel = JSON.parse(localStorage.getItem('lastSelectedModel')) || {};
|
||||
const lastSelectedTools = JSON.parse(localStorage.getItem('lastSelectedTools')) || [];
|
||||
const lastBingSettings = JSON.parse(localStorage.getItem('lastBingSettings')) || [];
|
||||
|
||||
if (endpoint === 'azureOpenAI' || endpoint === 'openAI') {
|
||||
conversation = {
|
||||
|
|
@ -43,13 +44,14 @@ const buildDefaultConversation = ({
|
|||
topK: lastConversationSetup?.topK ?? 40
|
||||
};
|
||||
} else if (endpoint === 'bingAI') {
|
||||
const { jailbreak, toneStyle } = lastBingSettings;
|
||||
conversation = {
|
||||
...conversation,
|
||||
endpoint,
|
||||
jailbreak: lastConversationSetup?.jailbreak ?? false,
|
||||
jailbreak: lastConversationSetup?.jailbreak ?? jailbreak ?? false,
|
||||
context: lastConversationSetup?.context ?? null,
|
||||
systemMessage: lastConversationSetup?.systemMessage ?? null,
|
||||
toneStyle: lastConversationSetup?.toneStyle ?? 'creative',
|
||||
toneStyle: lastConversationSetup?.toneStyle ?? toneStyle ?? 'creative',
|
||||
jailbreakConversationId: lastConversationSetup?.jailbreakConversationId ?? null,
|
||||
conversationSignature: null,
|
||||
clientId: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue