diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index e97be0bc4332a29a2c34afea357d3fad81f4ce87..d89d6556b8df0cad3b298571d5e2ab18ad424f61 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -2,7 +2,7 @@ module.exports = { apps: [{ name: "RAGChat-Frontend", script: "npm", - args: "start", + args: "run dev", watch: false, error_file: 'logs/error.log', out_file: 'logs/output.log' diff --git a/src/components/chat/Message.jsx b/src/components/chat/Message.jsx index 5b83f88472035bc4d1425d2ae8d0f0894cc48221..4b1052a89e0dcaf2724f35c39597f7429356e148 100644 --- a/src/components/chat/Message.jsx +++ b/src/components/chat/Message.jsx @@ -1,6 +1,6 @@ import React from 'react'; -function Message({ sender, message }) { +function Message({ sender, message, source }) { // ################################# // HOOKS // ################################# @@ -36,6 +36,7 @@ function Message({ sender, message }) { <div className={`p-3 mx-3 my-1 rounded-2xl ${tileBorder} ${tileColor} ${tileMargin}`}> <div className={`text-xs flex justify-between ${senderClasses}`} > <div>{sender}</div> + <div>{source}</div> </div> <div className={`${messageClasses} whitespace-pre-line`}> {message} diff --git a/src/components/chat/Messages.jsx b/src/components/chat/Messages.jsx index c29101da06556750a374c1f2428f4fc1b28e9189..665be9bf75283c544f042fffcee97fddc5da9170 100644 --- a/src/components/chat/Messages.jsx +++ b/src/components/chat/Messages.jsx @@ -48,6 +48,7 @@ const Messages = () => { key={index} sender={prompt.type} message={prompt.data.content} + source={prompt.data.source} /> )) } diff --git a/src/components/chat/PromptInput.jsx b/src/components/chat/PromptInput.jsx index accf0c0bd073cb5628ec90bf586fb336843efa5c..9763f164060182999e84428885627c3af4e2bc3d 100644 --- a/src/components/chat/PromptInput.jsx +++ b/src/components/chat/PromptInput.jsx @@ -47,6 +47,7 @@ function PromptInput() { // send input to api const result = await api.post('/ai/chat', inputs); // update chat history + // BUG if currentChatId is null visible update fails updateChatHistory(currentChatId, result.data.chat.chatHistory); // clear input field methods.resetField('input'); @@ -58,8 +59,7 @@ function PromptInput() { } } - // TODO fetch available model names from backend - // TODO make model a dropdown + // TODO width of input field on large screens should increase // ################################# // OUTPUT // #################################