Commit graph

11,619 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
81d231c632 🐛 fix(vertex/base.py): fix vertex_type assignment to handle uppercase template types
🐛 fix(interface/loading.py): fix custom_node instantiation to handle classes without initialize method
 feat(template/frontend_node/prompts.py): change type_name to match class name
 feat(template/frontend_node/tools.py): change type_name to match class name
🔥 chore(test_agents_template.py): remove test_agents_settings and update initialize_agent test
The vertex_type assignment in the Vertex class was not handling uppercase template types correctly. This has been fixed to handle both uppercase and lowercase types. The custom_node instantiation in the instantiate_class function was not handling classes without an initialize method correctly. This has been fixed to instantiate the class directly if the initialize method is not present. The type_name in the ZeroShotPromptNode and PythonFunctionToolNode classes have been changed to match the class name. The test_agents_settings test has been removed as it is no longer necessary and the initialize_agent test has been updated to match the new AgentInitializer class name.
2023-06-07 21:36:40 -03:00
Gabriel Luiz Freitas Almeida
04bd0f43fb 🔨 refactor(custom.py): rename CustomChain to CustomAgentExecutor
🔨 refactor(base.py): add CustomAgentExecutor class and move CustomChain to base.py
🔨 refactor(custom_lists.py): update reference to CustomChain to CustomAgentExecutor
The CustomChain class has been renamed to CustomAgentExecutor to better reflect its purpose. The class has been moved to base.py and a new CustomAgentExecutor class has been added to custom.py. The reference to CustomChain in custom_lists.py has been updated to CustomAgentExecutor. These changes improve the semantics of the code and make it easier to understand the purpose of the classes.
2023-06-07 21:14:40 -03:00
Gabriel Luiz Freitas Almeida
f0975ddf63 🚀 feat(langflow): add new chains to config.yaml and custom chains to interface/chains/custom.py
 feat(langflow): add new chains to config.yaml and custom chains to interface/chains/custom.py
The following chains were added to the config.yaml file: RetrievalQA, RetrievalQAWithSourcesChain, QAWithSourcesChain, ConversationalRetrievalChain, and CombineDocsChain. These chains were added to improve the functionality of the application and provide more options for users.

In addition, custom chains were added to the interface/chains/custom.py file. The CombineDocsChain was added to allow users to combine multiple documents into a single document for use in the question answering chains. The QA_CHAIN_TYPES constant was also added to the frontend_node/constants.py file to provide a list of available question answering chain types.
2023-06-07 19:48:51 -03:00
Gabriel Luiz Freitas Almeida
c8125b3386 🔀 refactor(customs.py): add load_qa_chain to CUSTOM_NODES
🔀 refactor(custom_lists.py): merge CUSTOM_AGENTS and CUSTOM_CHAINS into CUSTOM_NODES
🔀 refactor(loading.py): add instantiate_chains function to instantiate chains
🔀 refactor(base.py): add CustomChain class
The changes add support for a new chain called load_qa_chain to CUSTOM_NODES. CUSTOM_AGENTS and CUSTOM_CHAINS are merged into CUSTOM_NODES. A new function called instantiate_chains is added to instantiate chains. A new class called CustomChain is added to the base.py file. This class is used to define a custom chain.
2023-06-07 19:48:16 -03:00
Gabriel Luiz Freitas Almeida
b5ab95c4cc 🔨 refactor(custom.py): remove unused code
 feat(frontend_node): add extra fields to MemoryFrontendNode and ChainFrontendNode
The unused code in custom.py has been removed. The MemoryFrontendNode and ChainFrontendNode classes have been updated to include additional fields that are required for their respective templates. The MemoryFrontendNode now has a return_messages field, and the ChainFrontendNode now has a memory field. These fields are optional and can be toggled on or off as required.
2023-06-07 19:46:51 -03:00
Gabriel Luiz Freitas Almeida
2ca750f654 feat: add BaseRetriever as base class for VectorStores 2023-06-07 19:45:15 -03:00
Lucas Oliveira
62b33a19dc Changes to the menu structure 2023-06-07 19:44:52 -03:00
anovazzi1
5ab186bd88 Merge branch 'feat/node-toolbar' of personal:logspace-ai/langflow into feat/node-toolbar 2023-06-07 19:41:42 -03:00
anovazzi1
e148db41f0 keeping visual updates after node edition 2023-06-07 19:41:25 -03:00
Cristhian Zanforlin Lousa
354822813f adding tailwind animation 2023-06-07 19:40:16 -03:00
Cristhian Zanforlin Lousa
1373e336ff text-center input fields 2023-06-07 19:28:57 -03:00
Cristhian Zanforlin Lousa
b7c847930b adding index to alerts 2023-06-07 19:13:21 -03:00
Cristhian Zanforlin Lousa
dad98a47f6 formatting code 2023-06-07 18:59:47 -03:00
Cristhian Zanforlin Lousa
3cc8c8e6b5 changing code, export, python modal to shadcn ui 2023-06-07 18:59:11 -03:00
Alexandre Henrique
5862f19c20 Merge branch 'add_extra_fields_documentloaders' of https://github.com/logspace-ai/langflow into add_extra_fields_documentloaders 2023-06-07 16:52:58 -03:00
Gabriel Luiz Freitas Almeida
af6a8b902a fix: initialize_agent now is called AgentInitializer 2023-06-07 16:42:12 -03:00
Gabriel Luiz Freitas Almeida
259b66bb00 fix: vertex_type now comes directly from template.type_name 2023-06-07 16:41:48 -03:00
Alexandre Henrique
1c98506a5f Added RecursiveCharacterTextSplitter method 2023-06-07 16:40:46 -03:00
Alexandre Henrique
feb3423101 Added RecursiveCharacterTextSplitter method 2023-06-07 16:38:23 -03:00
Gabriel Luiz Freitas Almeida
b21bd3b8e0 fix: now the version badge text aligns when there's no version 2023-06-07 16:28:48 -03:00
Gabriel Luiz Freitas Almeida
bcba8e0931 Merge remote-tracking branch 'origin/main' into dev 2023-06-07 14:33:09 -03:00
Gabriel Luiz Freitas Almeida
58db0f3c8c
Hotfix: Blank UI bug and other bugfix v0.0.85 (#455)
This release fixes #353 and a bug where a parameter of value `False` would be treated as null.
2023-06-07 14:05:38 -03:00
anovazzi1
78082b5649 update poetry lock 2023-06-07 10:58:11 -03:00
anovazzi1
e3cfdcd136 update version 2023-06-07 10:54:46 -03:00
anovazzi1
b878e1af6a hotfix: fix bug that causes the blank screen 2023-06-07 10:53:45 -03:00
Gabriel Luiz Freitas Almeida
824ad20471
fix: validation now properly checks for null values (#454) 2023-06-07 06:39:20 -03:00
Gabriel Luiz Freitas Almeida
1435d2de83 🔖 chore(pyproject.toml): bump up version to 0.0.84
This commit only updates the version number of the package in the pyproject.toml file. The version number is updated to 0.0.84. This is a chore commit as it does not add any new features or fix any bugs, but it is necessary to keep track of the package version.
2023-06-07 06:29:17 -03:00
Gabriel Luiz Freitas Almeida
7bba3fd087 🐛 fix(chatModal): fix conditional statement to check for undefined and null values
The conditional statement in line 292 was not properly checking for undefined and null values, which could lead to unexpected behavior. The fix ensures that the statement checks for all falsy values, including undefined and null.
2023-06-07 06:25:08 -03:00
Gabriel Luiz Freitas Almeida
4ee9b044bd 🚀 feat(Makefile): add build_and_run target to build and run the application
The new build_and_run target removes the dist folder, builds the application, installs it, and runs it. This target is useful for quickly building and running the application in a development environment.
2023-06-06 23:32:05 -03:00
Gabriel Luiz Freitas Almeida
e7e510a218 fix: this commit tries to fix issue of blank UI 2023-06-06 23:31:06 -03:00
Gabriel Luiz Freitas Almeida
7b40e8bafa 📦 chore(pyproject.toml): add multiprocess dependency to dev dependencies
The multiprocess library is added to the dev dependencies to support parallel processing in the development environment.
2023-06-06 23:30:21 -03:00
Gabriel Luiz Freitas Almeida
72afbb834c 🐛 fix(__main__.py): fix typo in sendAll function URL
 feat(__main__.py): add banner with title and info text to be displayed on server start
🐛 fix(App.tsx): fix API endpoint URL
The sendAll function URL had an extra forward slash. The API endpoint URL in App.tsx was incorrect and has been fixed. A banner with a title and info text has been added to be displayed on server start to provide users with more information about the application.
2023-06-06 23:29:42 -03:00
Cristhian Zanforlin Lousa
b8aae5f702 starting migration modals to shadcn 2023-06-06 22:55:15 -03:00
Cristhian Zanforlin Lousa
c797b98984 changing the package.json installation 2023-06-06 18:32:39 -03:00
Cristhian Zanforlin Lousa
a2137364a4 adding edit nodes 2023-06-06 18:30:33 -03:00
Cristhian Zanforlin Lousa
de37410e54 adding validator when there are no options 2023-06-06 18:11:38 -03:00
Gabriel Luiz Freitas Almeida
496ad0ede5 Merge remote-tracking branch 'origin/dev' into add_extra_fields_documentloaders 2023-06-06 17:48:13 -03:00
Gabriel Luiz Freitas Almeida
9823b4c9c5
🚀 feat(customs.py): re-add PythonFunction to CUSTOM_NODES (#450) 2023-06-06 17:47:24 -03:00
Gabriel Luiz Freitas Almeida
683b7ab4d0 🚀 feat(config.yaml): add PythonFunction to the list of available tools
The PythonFunction tool has been added to the list of available tools in the config.yaml file. This allows the backend to use Python functions as part of the language processing pipeline.
2023-06-06 17:41:17 -03:00
Gabriel Luiz Freitas Almeida
2feeeb9ecd 🐛 fix(flow.py): make flow field optional to allow creation of flows without a flow
🧪 test(test_database.py): add test case for creating flows without a flow
The flow field is now optional to allow creation of flows without a flow. This is useful when creating a flow that will be populated later. A test case was added to ensure that flows can be created without a flow.
2023-06-06 17:37:05 -03:00
Gabriel Luiz Freitas Almeida
1d33933d64 🐛 fix(__main__.py): make database_url parameter optional in update_settings function
🐛 fix(llms.py): add name check before checking if "azure" is in name.lower()
🔨 refactor(test_database.py): rename updated_flow_style variable to to_update_flow_style for clarity
The update_settings function now has an optional database_url parameter to allow for more flexibility in updating settings. The llms.py file now checks if the name variable is not None before checking if "azure" is in name.lower(). In test_database.py, the updated_flow_style variable is renamed to to_update_flow_style for clarity.
2023-06-06 16:30:34 -03:00
Gabriel Luiz Freitas Almeida
b1276028f9 🚨 fix(test_database.py): fix API endpoint URLs to include version number
 feat(test_database.py): add tests for creating, reading, updating, and deleting FlowStyle objects
🚨 fix(test_database.py): fix flow_id type in test_read_flow to be UUID instead of string
🚨 fix(test_database.py): fix HTTP method in test_update_flow from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow and test_update_nonexistent_flow
🚨 fix(test_database.py): fix HTTP method in test_update_flow_idempotency from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow_idempotency
🚨 fix(test_database.py): fix HTTP method in test_delete_flow from DELETE to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_delete_flow and test_delete_nonexistent_flow
🚨 fix(test_database.py): fix API endpoint URLs in test_read_flows and test_read_empty_flows
The changes in this commit fix the API endpoint URLs to include the version number and fix various HTTP methods. Additionally, tests were added for creating, reading, updating, and deleting FlowStyle objects. The test_read_flow was fixed to use UUID instead of string for the flow_id.

🚨 test(database.py): add tests for CRUD operations on FlowStyle model
This commit adds tests for the CRUD operations on the FlowStyle model. The tests include creating a flow style, reading all flow styles, reading a single flow style, updating a flow style, and deleting a flow style. These tests ensure that the API endpoints for the FlowStyle model are working as expected.
2023-06-06 16:26:00 -03:00
Gabriel Luiz Freitas Almeida
ce9b3bfbd3 🎨 refactor(schemas.py): add FlowListRead schema and SQLModelSerializable base model
The FlowListRead schema is added to support reading a list of flows with their styles. The SQLModelSerializable base model is added to support serialization of SQLModel objects to JSON using orjson. This improves performance and reduces memory usage.

🐛 fix(flow.py): add optional style relationship to Flow model
The style relationship is now optional to allow for flows without styles. This is achieved by setting the uselist parameter of the sa_relationship_kwargs to False.

 feat(flow.py): add FlowReadWithStyle and FlowUpdate models
The FlowReadWithStyle model is added to support reading a flow with its style. The FlowUpdate model is added to support updating a flow.
2023-06-06 16:24:56 -03:00
Gabriel Luiz Freitas Almeida
32ae6fe0ef 🎉 feat(flow_style.py): add FlowStyle model and its CRUD classes
The FlowStyle model is added to the project, which represents the style of a flow. It has a color and an emoji field, and a foreign key to the Flow model. The CRUD classes are also added to the file, which are FlowStyleCreate, FlowStyleRead, and FlowStyleUpdate. These classes are used to create, read, and update FlowStyle instances respectively.
2023-06-06 16:24:20 -03:00
Gabriel Luiz Freitas Almeida
cac0cbc374 🔥 chore(flow_styles.py): remove unused imports and update comments
The imports for the deleted FlowStyle model are removed from flow_styles.py. The comments for the FlowStyleCreate class are updated to reflect the fields it contains.
2023-06-06 16:24:01 -03:00
Gabriel Luiz Freitas Almeida
183f80b1fc 🔥 chore(database.py): remove unused code and endpoints related to flows
 feat(router.py): add new routers for flows and flow styles
🔧 refactor(__init__.py): add new routers to __all__ list
🔧 refactor(conftest.py): update import statement for get_session function
The unused code and endpoints related to flows have been removed from the database.py file. New routers for flows and flow styles have been added to the router.py file. The __all__ list in the __init__.py file has been updated to include the new routers. The import statement for the get_session function in the conftest.py file has been updated to reflect the new location of the function.
2023-06-06 16:23:37 -03:00
Gabriel Luiz Freitas Almeida
9102d8468f 📦 chore(pyproject.toml): add orjson dependency to improve JSON serialization performance
The orjson library is added as a dependency to improve the performance of JSON serialization. This will help to reduce the time taken to serialize and deserialize JSON data, which is especially important in high-performance applications.
2023-06-06 16:21:46 -03:00
Gabriel Luiz Freitas Almeida
f5f0983116 Merge remote-tracking branch 'origin/dev' into db 2023-06-06 12:57:46 -03:00
Gabriel Luiz Freitas Almeida
998d1bf5ed 🚀 chore(Makefile): add install_backend command to backend target
The Makefile has been updated to include the `install_backend` command as a dependency of the `backend` target. This ensures that the backend dependencies are installed before running the backend server.
2023-06-06 12:55:12 -03:00
Gabriel Luiz Freitas Almeida
0eb60c0bf0
API Refactor and structure changes (#449) 2023-06-06 12:52:41 -03:00