diff --git a/packages/lb-annotation/src/constant/tool.ts b/packages/lb-annotation/src/constant/tool.ts index 48dab6014..f0c89818c 100644 --- a/packages/lb-annotation/src/constant/tool.ts +++ b/packages/lb-annotation/src/constant/tool.ts @@ -71,6 +71,7 @@ export enum EToolName { LLM = 'LLMTool', /** NLP标注工具-大模型 */ NLP = 'NLPTool', + LLMMultiWheel = 'LLMMultiWheelTool', } export enum ECheckModel { @@ -110,6 +111,7 @@ export const TOOL_NAME: { [a: string]: string } = { [EToolName.Cuboid]: '立体框', [EToolName.LLM]: '大模型', [EToolName.NLP]: 'NLP标注', + [EToolName.LLMMultiWheel]: '大模型(多轮对话)', }; export const TOOL_NAME_EN: { [a: string]: string } = { @@ -136,6 +138,7 @@ export const TOOL_NAME_EN: { [a: string]: string } = { [EToolName.Cuboid]: 'Cuboid', [EToolName.LLM]: 'LLM', [EToolName.NLP]: 'NLP', + [EToolName.LLMMultiWheel]: 'LLMMultiWheelTool', }; export enum EDependPattern { diff --git a/packages/lb-components/src/components/LLMMultiWheelView/dialogView/index.tsx b/packages/lb-components/src/components/LLMMultiWheelView/dialogView/index.tsx new file mode 100644 index 000000000..9d203dcba --- /dev/null +++ b/packages/lb-components/src/components/LLMMultiWheelView/dialogView/index.tsx @@ -0,0 +1,88 @@ +import { getTextControlByConfig, RenderAnswer } from '@/components/LLMToolView/questionView'; +import { RenderQuestion } from '@/components/LLMToolView/questionView/components/header'; +import ImgView from '@/components/LLMToolView/questionView/components/imgView'; +import { ILLMMultiWheelToolConfig } from '@/components/LLMToolView/types'; +import useLLMMultiWheelStore from '@/store/LLMMultiWheel'; +import { classnames } from '@/utils'; +import { LLMMultiWheelViewCls } from '@/views/MainView/LLMMultiWheelLayout'; +import { Button } from 'antd'; +import React, { useContext, useEffect, useState } from 'react'; +// import { LLMMultiWheelViewCls } from '..'; + +interface IDialogViewProps { + id: number | string; + answerList: any; + question: any; + name?: string; + index: number; + isSelected: boolean; + answerIsImg: boolean; + questionIsImg: boolean; + LLMConfig?: ILLMMultiWheelToolConfig; +} + +const DialogView = (props: IDialogViewProps) => { + const { + id, + answerList, + question, + index, + name = '', + answerIsImg, + questionIsImg, + LLMConfig, + } = props; + const { dataFormatType, selectedID, setSelectedID } = useLLMMultiWheelStore(); + const order = index + 1; + const showName = name || `对话${order}`; + + return ( +