This commit is contained in:
archer
2023-07-05 18:12:00 +08:00
parent 63d1657f9b
commit 569772148f
7 changed files with 26 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
chatModelList.push(ChatModelMap[OpenAiChatEnum.GPT3516k]);
chatModelList.push(ChatModelMap[OpenAiChatEnum.GPT35]);
chatModelList.push(ChatModelMap[OpenAiChatEnum.GPT4LOW]);
chatModelList.push(ChatModelMap[OpenAiChatEnum.GPT4]);
jsonRes(res, {

View File

@@ -21,7 +21,7 @@ import { useSelectFile } from '@/hooks/useSelectFile';
import { compressImg } from '@/utils/file';
import { getErrText } from '@/utils/tools';
import { useConfirm } from '@/hooks/useConfirm';
import { ChatModelMap, getChatModelList } from '@/constants/model';
import { ChatModelMap, chatModelList } from '@/constants/model';
import { formatPrice } from '@/utils/user';
import type { ModelSchema } from '@/types/mongoSchema';
@@ -185,8 +185,6 @@ const Settings = ({ modelId }: { modelId: string }) => {
}
});
const { data: chatModelList = [] } = useQuery(['initChatModelList'], getChatModelList);
return (
<Box
pb={3}
@@ -240,7 +238,7 @@ const Settings = ({ modelId }: { modelId: string }) => {
</Box>
<MySelect
width={['90%', '280px']}
width={['100%', '300px']}
value={getValues('chat.chatModel')}
list={chatModelList.map((item) => ({
id: item.chatModel,
@@ -265,7 +263,7 @@ const Settings = ({ modelId }: { modelId: string }) => {
{ label: '严谨', value: 0 },
{ label: '发散', value: 10 }
]}
width={['90%', '260px']}
width={['95%', '280px']}
min={0}
max={10}
activeVal={getValues('chat.temperature')}
@@ -286,7 +284,7 @@ const Settings = ({ modelId }: { modelId: string }) => {
{ label: '100', value: 100 },
{ label: `${tokenLimit}`, value: tokenLimit }
]}
width={['90%', '260px']}
width={['95%', '280px']}
min={100}
max={tokenLimit}
step={50}

View File

@@ -40,7 +40,7 @@ const BillTable = () => {
<Tr>
<Th></Th>
<Th></Th>
<Th></Th>
<Th></Th>
<Th></Th>
<Th>Tokens </Th>
<Th></Th>