docuservix/widgets/chat: добавлен компонент чата
This commit is contained in:
@@ -1,10 +1,32 @@
|
||||
import Layout from '@theme/Layout';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import { IChat } from '@docuservix/models/chat';
|
||||
import { Chat } from '@docuservix/widgets/chat';
|
||||
|
||||
const dialog: IChat = {
|
||||
messages: [
|
||||
{
|
||||
role: 'user',
|
||||
content: 'Can you show me some CSS animations? It can be simple tools like chatbots...',
|
||||
},
|
||||
{
|
||||
role: 'assistant',
|
||||
content: "Hello! I'm your AI assistant. How can I help you today?",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export function ChatPage(): ReactNode {
|
||||
return (
|
||||
<Layout title="Чат">
|
||||
<main className="container margin-vert--lg">Hello world!</main>
|
||||
<main className="container margin-vert--lg">
|
||||
<Chat
|
||||
dialog={dialog}
|
||||
statusMessage="Unable to connect to the server"
|
||||
typing
|
||||
/>
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user