安装
yarn install @jack_jiang/ai-chat
#使用
import type { FC } from 'react';
import ChatBot from '@jack_jiang/ai-chat';
import '@jack_jiang/ai-chat/dist/style.css';
const lexConfig = {
botName: "gwibotdev",
botAlias: "gwibotdev",
userId: "chatbot",
}
const awsWrapperConfig = {
region: 'us-east-1',
identityPoolId: 'us-east-1:xxxxxxx'
}
const App: FC = () => {
return (
<div>
<ChatBot
lexConfig={lexConfig}
awsWrapperConfig={awsWrapperConfig}
/>
</div>
)
}
export default App;