feat: update env example.

feat: support OPENAI_REVERSE_PROXY
feat: support set availModels in env file

fix: chatgpt Browser send logic refactor.

fix: title wrong usage of responseMessage
BREAKING: some env paramaters has been changed!
This commit is contained in:
Wentao Lyu 2023-04-05 21:21:02 +08:00
parent a5202f84cc
commit 22b9524ad3
19 changed files with 259 additions and 197 deletions

View file

@ -21,6 +21,12 @@ function ChatGPTOptions() {
const models = endpointsConfig?.['chatGPTBrowser']?.['availableModels'] || [];
// const modelMap = new Map([
// ['Default (GPT-3.5)', 'text-davinci-002-render-sha'],
// ['Legacy (GPT-3.5)', 'text-davinci-002-render-paid'],
// ['GPT-4', 'gpt-4']
// ]);
const setOption = param => newValue => {
let update = {};
update[param] = newValue;
@ -43,7 +49,7 @@ function ChatGPTOptions() {
showLabel={false}
className={cn(
cardStyle,
'min-w-48 z-50 flex h-[40px] w-48 flex-none items-center justify-center px-4 ring-0 hover:cursor-pointer hover:bg-slate-50 focus:ring-0 focus:ring-offset-0 data-[state=open]:bg-slate-50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:data-[state=open]:bg-gray-600'
'z-50 flex h-[40px] w-[260px] min-w-[260px] flex-none items-center justify-center px-4 ring-0 hover:cursor-pointer hover:bg-slate-50 focus:ring-0 focus:ring-offset-0 data-[state=open]:bg-slate-50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:data-[state=open]:bg-gray-600'
)}
/>
</div>