12345678910111213141516171819 |
- import { EChatRole, TChatRole } from "@/types/bot";
- import Message from "./Message";
- import MessageRobot from "./MessageRobot";
- import { TAgentDetail } from "@/types/agent";
- interface Props {
- agent?: TAgentDetail,
- role: TChatRole,
- text: string
- textReasoning?: string
- }
- export default ({agent, text, role, textReasoning=''}:Props) => {
- if(role === EChatRole.User ){
- return <Message text={text}/>
- }
- return <MessageRobot textReasoning={textReasoning} text={text} agent={agent}/>
- }
|