You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I Have been trying to fix that in my code but for some reason the prochat component is not rendering the line breaks
Here is my backend code as well:
messages.pop()
let systemTemplate = ChatPromptTemplate.fromMessages([
['system', "Você é um assistente chamado cortex sua principal função é responder os usuários com base apenas nas informações abaixo: \n {information} "],
...messages,
['user', "{text}"],
]);
let systemMessage = await systemTemplate.invoke({
information: data[0].raw_value,
text: lastMessage.content
});
const completion = await chat.invoke(systemMessage);
return NextResponse.json(completion.content);
Here is my proChat component in the frontend:
{showComponent && (
<ProChat
displayMode={"docs"}
style={{
height: "85vh",
color: theme.colorText,
}}
locale="en-US"
actions={{
render(defaultDoms) {
return [
...defaultDoms,
<Button key="custom" >
Generate Notes
</Button>,
];
},
}}
helloMessage={"Hello! How can I help you today?"}
placeholder="Digite aqui..."
request={'/api/processChat'}
config={{params:{
conversationId:record?.id,
}}}
/>
The text was updated successfully, but these errors were encountered:
I Have been trying to fix that in my code but for some reason the prochat component is not rendering the line breaks
Here is my backend code as well:
Here is my proChat component in the frontend:
The text was updated successfully, but these errors were encountered: