chatbox ui

This commit is contained in:
archer
2023-07-11 23:22:01 +08:00
parent eb768d9c04
commit b2e2f60e0d
46 changed files with 1123 additions and 2817 deletions

View File

@@ -58,7 +58,6 @@ const ChatTest = (
?.find((item) => item.flowType === FlowModuleTypeEnum.historyNode)
?.inputs?.find((item) => item.key === 'maxContext')?.value || 0;
const history = messages.slice(-historyMaxLen - 2, -2);
console.log(history, 'history====');
// 流请求,获取数据
const { responseText } = await streamFetch({
@@ -87,8 +86,6 @@ const ChatTest = (
useImperativeHandle(ref, () => ({
resetChatTest() {
console.log(ChatBoxRef.current, '===');
ChatBoxRef.current?.resetHistory([]);
ChatBoxRef.current?.resetVariables();
}
@@ -147,6 +144,7 @@ const ChatTest = (
variableModules={variableModules}
welcomeText={welcomeText}
onStartChat={startChat}
onDelMessage={() => {}}
/>
</Box>
</Flex>