diff --git a/src/frontend/package.json b/src/frontend/package.json
index 55749b635..927dab67e 100644
--- a/src/frontend/package.json
+++ b/src/frontend/package.json
@@ -61,5 +61,5 @@
"last 1 safari version"
]
},
- "proxy": "http://backend:7860"
+ "proxy": "http://127.0.0.1:5003"
}
diff --git a/src/frontend/src/modals/chatModal/chatMessage/index.tsx b/src/frontend/src/modals/chatModal/chatMessage/index.tsx
index 60a07e1b7..e9d3a699a 100644
--- a/src/frontend/src/modals/chatModal/chatMessage/index.tsx
+++ b/src/frontend/src/modals/chatModal/chatMessage/index.tsx
@@ -19,12 +19,12 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
>
{!chat.isSend &&

}
- {chat.isSend &&
}
+ {chat.isSend &&
}
{!chat.isSend ? (
@@ -49,7 +49,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
)}
{chat.thought && chat.thought !== "" && !hidden &&
}
- {chat.file ? (
+ {chat.files ? (
) : (
diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx
index b5413a517..32c370a22 100644
--- a/src/frontend/src/modals/chatModal/index.tsx
+++ b/src/frontend/src/modals/chatModal/index.tsx
@@ -52,7 +52,7 @@ export default function ChatModal({
};
useEffect(() => {
- const newWs = new WebSocket(`ws://localhost:7860/chat/${flow.id}`);
+ const newWs = new WebSocket(`ws://127.0.0.1:5003/chat/${flow.id}`);
newWs.onopen = () => {
console.log("WebSocket connection established!");
};
@@ -78,7 +78,6 @@ export default function ChatModal({
isSend: !chatItem.is_bot,
message: chatItem.message,
thought: chatItem.intermediate_steps,
- file:chatItem.data
});
}
newChatHistory.push({
@@ -217,7 +216,8 @@ export default function ChatModal({
}
function clearChat() {
setChatHistory([]);
- updateFlow({ ..._.cloneDeep(flow), chat: [] });
+ ws.send(JSON.stringify({clear_history:true}))
+
}
const { closePopUp } = useContext(PopUpContext);
diff --git a/src/frontend/src/types/chat/index.ts b/src/frontend/src/types/chat/index.ts
index b32968290..0e3fe4ef6 100644
--- a/src/frontend/src/types/chat/index.ts
+++ b/src/frontend/src/types/chat/index.ts
@@ -1,5 +1,10 @@
-import { ReactFlowInstance } from 'reactflow';
+import { ReactFlowInstance } from "reactflow";
import { FlowType } from "../flow";
-export type ChatType = {flow:FlowType,reactFlowInstance:ReactFlowInstance}
-export type ChatMessageType = { message: string; isSend: boolean, thought?:string,file?:string }
\ No newline at end of file
+export type ChatType = { flow: FlowType; reactFlowInstance: ReactFlowInstance };
+export type ChatMessageType = {
+ message: string;
+ isSend: boolean;
+ thought?: string;
+ files?: Array<{content:string,type:string}>;
+};