Skip to content

Commit 8be8c04

Browse files
committed
Update ChatView component and Increase max_tokens
1 parent ff940e6 commit 8be8c04

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ app.post('/chat', async (req,res)=>{
1919
model:"text-davinci-003",
2020
prompt: `${message}`,
2121
temperature: 0.7,
22-
max_tokens: 100
22+
max_tokens: 2048
2323
});
2424
res.json({
2525
message:response.data.choices[0].text

frontend/src/components/ChatView/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ const ChatView = () => {
5757
style={msg.type === "a" ? styles.receivedMsgStyle : styles.sentMsgStyle}
5858
align="start"
5959
>
60-
<div style={styles.msgTextStyle}>{msg.text}</div>
60+
<div
61+
style={styles.msgTextStyle}
62+
dangerouslySetInnerHTML={{ __html: msg.text.replace(/\n/g, "<br />") }}
63+
></div>
6164
{msg.type === "a" ? (
6265
<CopyToClipboard onCopy={() => setCopied(true)} text={msg.text}>
6366
<CopyOutlined />

0 commit comments

Comments
 (0)