Merge branch 'db' of github.com:logspace-ai/langflow into db

This commit is contained in:
Lucas Oliveira 2023-06-15 16:12:53 -03:00
commit 9b3e835a5b
2 changed files with 17 additions and 0 deletions

View file

@ -46,6 +46,12 @@ export default function BuildTrigger({
const allNodesValid = await streamNodeData(flow);
await enforceMinimumLoadingTime(startTime, minimumLoadingTime);
setIsBuilt(allNodesValid);
if(!allNodesValid) {
setErrorData({
title: "Oops! Looks like you missed something",
list: ["Check nodes and retry. Hover over 🔴 node for status."],
});
}
} catch (error) {
console.error("Error:", error);
} finally {

View file

@ -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) {
if (Array.isArray(data)) {
//set chat history