mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-29 05:20:49 +00:00
feat(conversationPreset.js): add context and systemMessage fields to conversation preset schema feat(askBingAI.js): pass context and systemMessage parameters to ask function feat(Settings.jsx): add toneStyle prop to BingAISettings component feat(BingAIOptions/index.jsx): add useEffect to check if advanced mode is needed feat(cleanupPreset.js): add context and systemMessage fields to cleaned up preset object feat(getDefaultConversation.js): add context and systemMessage fields to default conversation object feat(handleSubmit.js): add context and systemMessage fields to message object
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
|
|
import OpenAISettings from './OpenAI/Settings.jsx';
|
|
import BingAISettings from './BingAI/Settings.jsx';
|
|
|
|
// A preset dialog to show readonly preset values.
|
|
const Settings = ({ preset, ...props }) => {
|
|
const renderSettings = () => {
|
|
const { endpoint } = preset || {};
|
|
|
|
if (endpoint === 'openAI')
|
|
return (
|
|
<OpenAISettings
|
|
model={preset?.model}
|
|
chatGptLabel={preset?.chatGptLabel}
|
|
promptPrefix={preset?.promptPrefix}
|
|
temperature={preset?.temperature}
|
|
topP={preset?.top_p}
|
|
freqP={preset?.presence_penalty}
|
|
presP={preset?.frequency_penalty}
|
|
{...props}
|
|
/>
|
|
);
|
|
else if (endpoint === 'bingAI')
|
|
return (
|
|
<BingAISettings
|
|
toneStyle={preset?.toneStyle}
|
|
context={preset?.context}
|
|
systemMessage={preset?.systemMessage}
|
|
jailbreak={preset?.jailbreak}
|
|
{...props}
|
|
/>
|
|
);
|
|
else return <div className="text-black dark:text-white">Not implemented</div>;
|
|
};
|
|
|
|
return renderSettings();
|
|
};
|
|
|
|
export default Settings;
|