Merge branch 'db' of github.com:logspace-ai/langflow into db
This commit is contained in:
commit
8198d63302
11 changed files with 9936 additions and 9938 deletions
|
|
@ -12,6 +12,9 @@ class LLMFrontendNode(FrontendNode):
|
||||||
field.name.title().replace("Openai", "OpenAI").replace("_", " ")
|
field.name.title().replace("Openai", "OpenAI").replace("_", " ")
|
||||||
).replace("Api", "API")
|
).replace("Api", "API")
|
||||||
|
|
||||||
|
if "key" not in field.name.lower() and "token" not in field.name.lower():
|
||||||
|
field.password = False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def format_azure_field(field: TemplateField):
|
def format_azure_field(field: TemplateField):
|
||||||
if field.name == "model_name":
|
if field.name == "model_name":
|
||||||
|
|
@ -22,7 +25,6 @@ class LLMFrontendNode(FrontendNode):
|
||||||
field.value = "azure"
|
field.value = "azure"
|
||||||
elif field.name == "openai_api_version":
|
elif field.name == "openai_api_version":
|
||||||
field.password = False
|
field.password = False
|
||||||
field.value = "2023-03-15-preview"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def format_llama_field(field: TemplateField):
|
def format_llama_field(field: TemplateField):
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"serve": "vite preview",
|
"serve": "vite preview",
|
||||||
"format": "npx prettier --write \"src/**/*.{js,jsx,ts,tsx,json,md}\""
|
"format": "npx prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@ module.exports = {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
||||||
setIsMaxLength(false);
|
setIsMaxLength(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
setName(value)
|
setName(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,8 @@ export default function BuildTrigger({
|
||||||
}
|
}
|
||||||
// Step 4: Return true if all nodes are valid, false otherwise
|
// Step 4: Return true if all nodes are valid, false otherwise
|
||||||
return validationResults.every((result) => result);
|
return validationResults.every((result) => result);
|
||||||
}
|
} catch (e) {
|
||||||
catch(e){
|
console.log(e);
|
||||||
console.log(e)
|
|
||||||
eventSource.close();
|
eventSource.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,12 @@ export const MenuBar = ({ flows, tabId }) => {
|
||||||
<div className="flex items-center font-medium text-sm rounded-md py-1 px-1.5 gap-0.5">
|
<div className="flex items-center font-medium text-sm rounded-md py-1 px-1.5 gap-0.5">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<Button className="gap-2 flex items-center max-w-[200px]" variant="primary" size="sm">
|
<Button
|
||||||
<div className="truncate flex-1">
|
className="gap-2 flex items-center max-w-[200px]"
|
||||||
|
variant="primary"
|
||||||
{current_flow.name}
|
size="sm"
|
||||||
</div>
|
>
|
||||||
|
<div className="truncate flex-1">{current_flow.name}</div>
|
||||||
<ChevronDown className="w-4 h-4" />
|
<ChevronDown className="w-4 h-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@ const buttonVariants = cva(
|
||||||
"border border-input hover:bg-accent hover:text-accent-foreground",
|
"border border-input hover:bg-accent hover:text-accent-foreground",
|
||||||
primary:
|
primary:
|
||||||
"border bg-background text-secondary-foreground hover:bg-background/80 hover:shadow-sm",
|
"border bg-background text-secondary-foreground hover:bg-background/80 hover:shadow-sm",
|
||||||
secondary: "border border-muted bg-muted text-secondary-foreground hover:bg-secondary/80",
|
secondary:
|
||||||
|
"border border-muted bg-muted text-secondary-foreground hover:bg-secondary/80",
|
||||||
ghost: "hover:bg-accent hover:text-accent-foreground",
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
||||||
link: "underline-offset-4 hover:underline text-primary",
|
link: "underline-offset-4 hover:underline text-primary",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,6 @@ export default function ChatModal({
|
||||||
if (ref.current) ref.current.scrollIntoView({ behavior: "smooth" });
|
if (ref.current) ref.current.scrollIntoView({ behavior: "smooth" });
|
||||||
}, [chatHistory]);
|
}, [chatHistory]);
|
||||||
|
|
||||||
|
|
||||||
const ref = useRef(null);
|
const ref = useRef(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
const { fontFamily } = require("tailwindcss/defaultTheme")
|
const { fontFamily } = require("tailwindcss/defaultTheme");
|
||||||
|
|
||||||
import plugin from "tailwindcss/plugin";
|
import plugin from "tailwindcss/plugin";
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [require("tailwindcss-animate")],
|
plugins: [require("tailwindcss-animate")],
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"],
|
content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"],
|
||||||
|
|
@ -151,7 +151,7 @@ module.exports = {
|
||||||
"accordion-down": "accordion-down 0.2s ease-out",
|
"accordion-down": "accordion-down 0.2s ease-out",
|
||||||
"accordion-up": "accordion-up 0.2s ease-out",
|
"accordion-up": "accordion-up 0.2s ease-out",
|
||||||
"pulse-green": "pulseGreen 1s linear",
|
"pulse-green": "pulseGreen 1s linear",
|
||||||
'spin-once': 'spin 1s linear 0.7'
|
"spin-once": "spin 1s linear 0.7",
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
"red-outline": "rgba(255, 0, 0, 0.8)",
|
"red-outline": "rgba(255, 0, 0, 0.8)",
|
||||||
|
|
@ -181,17 +181,19 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
".truncate-multiline": {
|
".truncate-multiline": {
|
||||||
"display": "-webkit-box",
|
display: "-webkit-box",
|
||||||
"-webkit-line-clamp": "3", /* Change this number to the number of lines you want to show */
|
"-webkit-line-clamp":
|
||||||
|
"3" /* Change this number to the number of lines you want to show */,
|
||||||
"-webkit-box-orient": "vertical",
|
"-webkit-box-orient": "vertical",
|
||||||
"overflow": "hidden",
|
overflow: "hidden",
|
||||||
"text-overflow": "ellipsis",
|
"text-overflow": "ellipsis",
|
||||||
},
|
},
|
||||||
".truncate-doubleline": {
|
".truncate-doubleline": {
|
||||||
"display": "-webkit-box",
|
display: "-webkit-box",
|
||||||
"-webkit-line-clamp": "2", /* Change this number to the number of lines you want to show */
|
"-webkit-line-clamp":
|
||||||
|
"2" /* Change this number to the number of lines you want to show */,
|
||||||
"-webkit-box-orient": "vertical",
|
"-webkit-box-orient": "vertical",
|
||||||
"overflow": "hidden",
|
overflow: "hidden",
|
||||||
"text-overflow": "ellipsis",
|
"text-overflow": "ellipsis",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|
@ -19,9 +15,7 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"]
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue