Revert "Merge branch 'release' into dev"
This reverts commitdd3f3d4ca8, reversing changes made to27bc4c5498.
This commit is contained in:
parent
dd3f3d4ca8
commit
42d56f70ed
9 changed files with 425 additions and 430 deletions
1
Makefile
1
Makefile
|
|
@ -35,7 +35,6 @@ format:
|
||||||
cd src/frontend && npm run format
|
cd src/frontend && npm run format
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
make install_backend
|
|
||||||
poetry run mypy src/backend/langflow
|
poetry run mypy src/backend/langflow
|
||||||
poetry run black . --check
|
poetry run black . --check
|
||||||
poetry run ruff . --fix
|
poetry run ruff . --fix
|
||||||
|
|
|
||||||
810
poetry.lock
generated
810
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langflow"
|
name = "langflow"
|
||||||
version = "0.5.4"
|
version = "0.5.3"
|
||||||
description = "A Python package with a built-in web application"
|
description = "A Python package with a built-in web application"
|
||||||
authors = ["Logspace <contact@logspace.ai>"]
|
authors = ["Logspace <contact@logspace.ai>"]
|
||||||
maintainers = [
|
maintainers = [
|
||||||
|
|
@ -33,7 +33,7 @@ google-search-results = "^2.4.1"
|
||||||
google-api-python-client = "^2.79.0"
|
google-api-python-client = "^2.79.0"
|
||||||
typer = "^0.9.0"
|
typer = "^0.9.0"
|
||||||
gunicorn = "^21.2.0"
|
gunicorn = "^21.2.0"
|
||||||
langchain = "^0.0.320"
|
langchain = "^0.0.312"
|
||||||
openai = "^0.27.8"
|
openai = "^0.27.8"
|
||||||
pandas = "2.0.3"
|
pandas = "2.0.3"
|
||||||
chromadb = "^0.3.21"
|
chromadb = "^0.3.21"
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,9 @@ def get_all(
|
||||||
|
|
||||||
logger.debug("Building langchain types dict")
|
logger.debug("Building langchain types dict")
|
||||||
try:
|
try:
|
||||||
types_dict = get_all_types_dict(settings_service)
|
return get_all_types_dict(settings_service)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
||||||
return types_dict
|
|
||||||
|
|
||||||
|
|
||||||
# For backwards compatibility we will keep the old endpoint
|
# For backwards compatibility we will keep the old endpoint
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ from langchain.agents.load_tools import (
|
||||||
_EXTRA_OPTIONAL_TOOLS,
|
_EXTRA_OPTIONAL_TOOLS,
|
||||||
_LLM_TOOLS,
|
_LLM_TOOLS,
|
||||||
)
|
)
|
||||||
from langchain.tools.python.tool import PythonInputs
|
|
||||||
|
|
||||||
from langflow.custom import customs
|
from langflow.custom import customs
|
||||||
from langflow.interface.base import LangChainTypeCreator
|
from langflow.interface.base import LangChainTypeCreator
|
||||||
|
|
@ -162,14 +161,8 @@ class ToolCreator(LangChainTypeCreator):
|
||||||
template = Template(fields=fields, type_name=tool_type)
|
template = Template(fields=fields, type_name=tool_type)
|
||||||
|
|
||||||
tool_params = {**tool_params, **self.type_to_loader_dict[name]["params"]}
|
tool_params = {**tool_params, **self.type_to_loader_dict[name]["params"]}
|
||||||
template_dict = template.to_dict()
|
|
||||||
if (
|
|
||||||
"args_schema" in template_dict
|
|
||||||
and template_dict.get("args_schema").get("value") == PythonInputs
|
|
||||||
):
|
|
||||||
template_dict["args_schema"]["value"] = ""
|
|
||||||
return {
|
return {
|
||||||
"template": util.format_dict(template_dict),
|
"template": util.format_dict(template.to_dict()),
|
||||||
**tool_params,
|
**tool_params,
|
||||||
"base_classes": base_classes,
|
"base_classes": base_classes,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,10 @@ class UtilityCreator(LangChainTypeCreator):
|
||||||
"""
|
"""
|
||||||
if self.type_dict is None:
|
if self.type_dict is None:
|
||||||
settings_service = get_settings_service()
|
settings_service = get_settings_service()
|
||||||
self.type_dict = {}
|
self.type_dict = {
|
||||||
for utility_name in utilities.__all__:
|
utility_name: import_class(f"langchain.utilities.{utility_name}")
|
||||||
try:
|
for utility_name in utilities.__all__
|
||||||
imported = import_class(f"langchain.utilities.{utility_name}")
|
}
|
||||||
self.type_dict[utility_name] = imported
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
|
||||||
self.type_dict["SQLDatabase"] = utilities.SQLDatabase
|
self.type_dict["SQLDatabase"] = utilities.SQLDatabase
|
||||||
# Filter according to settings.utilities
|
# Filter according to settings.utilities
|
||||||
self.type_dict = {
|
self.type_dict = {
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,18 @@
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { darkContext } from "../../contexts/darkContext";
|
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { getVersion } from "../../controllers/API";
|
import { getVersion } from "../../controllers/API";
|
||||||
import Page from "../FlowPage/components/PageComponent";
|
import Page from "../FlowPage/components/PageComponent";
|
||||||
|
|
||||||
export default function ViewPage() {
|
export default function ViewPage() {
|
||||||
const { flows, tabId, setTabId } = useContext(TabsContext);
|
const { flows, tabId, setTabId } = useContext(TabsContext);
|
||||||
const { setDark } = useContext(darkContext);
|
const { id } = useParams();
|
||||||
const { id, theme } = useParams();
|
|
||||||
|
|
||||||
// Set flow tab id
|
// Set flow tab id
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTabId(id!);
|
setTabId(id!);
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (theme) {
|
|
||||||
setDark(theme === "dark");
|
|
||||||
} else {
|
|
||||||
setDark(false);
|
|
||||||
}
|
|
||||||
}, [theme]);
|
|
||||||
|
|
||||||
// Initialize state variable for the version
|
// Initialize state variable for the version
|
||||||
const [version, setVersion] = useState("");
|
const [version, setVersion] = useState("");
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const Router = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="view/:theme?"
|
path="view"
|
||||||
element={
|
element={
|
||||||
<ProtectedRoute>
|
<ProtectedRoute>
|
||||||
<ViewPage />
|
<ViewPage />
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ def test_prompt_template(client: TestClient, logged_in_headers):
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"show": False,
|
"show": False,
|
||||||
"multiline": False,
|
"multiline": False,
|
||||||
"value": False,
|
"value": True,
|
||||||
"password": False,
|
"password": False,
|
||||||
"name": "validate_template",
|
"name": "validate_template",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue