Refactor WebSocket connection to new port number 7860 in Makefile and add file upload support to ChatModal component.
This commit is contained in:
parent
01c23d6d8b
commit
cdc6d2994a
2 changed files with 295 additions and 293 deletions
2
Makefile
2
Makefile
|
|
@ -27,7 +27,7 @@ run_frontend:
|
||||||
cd src/frontend && npm start
|
cd src/frontend && npm start
|
||||||
|
|
||||||
run_backend:
|
run_backend:
|
||||||
poetry run uvicorn langflow.main:app --port 5003 --reload --log-level debug
|
poetry run uvicorn langflow.main:app --port 7860 --reload --log-level debug
|
||||||
|
|
||||||
build_frontend:
|
build_frontend:
|
||||||
cd src/frontend && CI='' npm run build
|
cd src/frontend && CI='' npm run build
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default function ChatModal({
|
||||||
};
|
};
|
||||||
|
|
||||||
function connectWS() {
|
function connectWS() {
|
||||||
const newWs = new WebSocket(`ws://127.0.0.1:5003/chat/${flow.id}`);
|
const newWs = new WebSocket(`ws://127.0.0.1:7860/chat/${flow.id}`);
|
||||||
newWs.onopen = () => {
|
newWs.onopen = () => {
|
||||||
console.log("WebSocket connection established!");
|
console.log("WebSocket connection established!");
|
||||||
};
|
};
|
||||||
|
|
@ -117,7 +117,6 @@ export default function ChatModal({
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (event.data !== "Error: 1005") {
|
if (event.data !== "Error: 1005") {
|
||||||
setErrorData({ title: event.data });
|
setErrorData({ title: event.data });
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -294,7 +293,10 @@ export default function ChatModal({
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col h-full text-center justify-center w-full items-center align-middle ">
|
<div className="flex flex-col h-full text-center justify-center w-full items-center align-middle ">
|
||||||
<span>
|
<span>
|
||||||
👋 <span className="text-gray-600 text-lg">LangFlow Chat</span>
|
👋{" "}
|
||||||
|
<span className="text-gray-600 text-lg">
|
||||||
|
LangFlow Chat
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<div className="bg-gray-100 rounded-md w-2/4 px-6 py-8 border border-gray-200">
|
<div className="bg-gray-100 rounded-md w-2/4 px-6 py-8 border border-gray-200">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue