System optimize (#303)

This commit is contained in:
Archer
2023-09-15 10:21:46 +08:00
committed by GitHub
parent 7c1ec04380
commit 4365a94ea9
36 changed files with 378 additions and 369 deletions

View File

@@ -26,8 +26,7 @@ import {
import { Box, Card, Flex, Input, Textarea, Button, useTheme, BoxProps } from '@chakra-ui/react';
import { feConfigs } from '@/store/static';
import { event } from '@/utils/plugin/eventbus';
import { adaptChatItem_openAI } from '@/utils/plugin/openai';
import { adaptChat2GptMessages } from '@/utils/common/adapt/message';
import { useMarkdown } from '@/hooks/useMarkdown';
import { VariableItemType } from '@/types/app';
import { VariableInputEnum } from '@/constants/app';
@@ -344,7 +343,7 @@ const ChatBox = (
const abortSignal = new AbortController();
controller.current = abortSignal;
const messages = adaptChatItem_openAI({ messages: newChatList, reserveId: true });
const messages = adaptChat2GptMessages({ messages: newChatList, reserveId: true });
const { responseData } = await onStartChat({
chatList: newChatList,