Merge pull request 'main' (#104) from YasinOnm08/interstellar_ai:main into main
Reviewed-on: https://interstellardevelopment.org/code/code/React-Group/interstellar_ai/pulls/104
This commit is contained in:
commit
662da97937
5 changed files with 1657 additions and 7 deletions
|
@ -1,4 +1,7 @@
|
|||
import React, { ForwardedRef, useState, useEffect, useRef } from 'react';
|
||||
import Markdown from 'react-markdown'
|
||||
import rehypeRaw from 'rehype-raw';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
type Message = {
|
||||
role: string
|
||||
|
@ -66,7 +69,9 @@ const ConversationFrontend = React.forwardRef<HTMLDivElement, ConversationProps>
|
|||
key={index}
|
||||
className={message.role === "user" ? 'user-message' : 'ai-message'}
|
||||
>
|
||||
<p> {message.content}</p>
|
||||
<Markdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]}>
|
||||
{message.content}
|
||||
</Markdown>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue