Merge branch 'db' of github.com:logspace-ai/langflow into db
This commit is contained in:
commit
9b3e835a5b
2 changed files with 17 additions and 0 deletions
|
|
@ -46,6 +46,12 @@ export default function BuildTrigger({
|
||||||
const allNodesValid = await streamNodeData(flow);
|
const allNodesValid = await streamNodeData(flow);
|
||||||
await enforceMinimumLoadingTime(startTime, minimumLoadingTime);
|
await enforceMinimumLoadingTime(startTime, minimumLoadingTime);
|
||||||
setIsBuilt(allNodesValid);
|
setIsBuilt(allNodesValid);
|
||||||
|
if(!allNodesValid) {
|
||||||
|
setErrorData({
|
||||||
|
title: "Oops! Looks like you missed something",
|
||||||
|
list: ["Check nodes and retry. Hover over 🔴 node for status."],
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error:", error);
|
console.error("Error:", error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,17 @@ export default function ChatModal({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getWebSocketUrl(chatId, isDevelopment = false) {
|
||||||
|
const isSecureProtocol = window.location.protocol === "https:";
|
||||||
|
const webSocketProtocol = isSecureProtocol ? "wss" : "ws";
|
||||||
|
const host = isDevelopment ? "localhost:7860" : window.location.host;
|
||||||
|
const chatEndpoint = `/api/v1/chat/${chatId}`;
|
||||||
|
|
||||||
|
return `${
|
||||||
|
isDevelopment ? "ws" : webSocketProtocol
|
||||||
|
}://${host}${chatEndpoint}`;
|
||||||
|
}
|
||||||
|
|
||||||
function handleWsMessage(data: any) {
|
function handleWsMessage(data: any) {
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
//set chat history
|
//set chat history
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue