feat: support user-provided token to bingAI and chatgptBrowser

This commit is contained in:
Wentao Lyu 2023-04-10 00:41:34 +08:00
parent a953fc9f2b
commit bbf2f8a6ca
22 changed files with 309 additions and 86 deletions

View file

@ -22,6 +22,7 @@ export default function TextChat({ isSearchView = false }) {
const [text, setText] = useRecoilState(store.text);
// const [text, setText] = useState('');
const endpointsConfig = useRecoilValue(store.endpointsConfig);
const isSubmitting = useRecoilValue(store.isSubmitting);
// TODO: do we need this?
@ -62,7 +63,7 @@ export default function TextChat({ isSearchView = false }) {
setText('');
};
const handleStopGenerating = (e) => {
const handleStopGenerating = e => {
e.preventDefault();
stopGenerating();
};
@ -169,6 +170,8 @@ export default function TextChat({ isSearchView = false }) {
handleStopGenerating={handleStopGenerating}
disabled={disabled || isNotAppendable}
isSubmitting={isSubmitting}
endpointsConfig={endpointsConfig}
endpoint={conversation?.endpoint}
/>
{latestMessage && conversation?.jailbreak && conversation.endpoint === 'bingAI' ? (
<AdjustToneButton onClick={handleBingToneSetting} />