Commit graph

7,638 commits

Author SHA1 Message Date
anovazzi1
1a962d8cfc format code 2023-09-22 15:28:51 -03:00
anovazzi1
ba1902d7fb add TODO comment 2023-09-22 15:28:25 -03:00
anovazzi1
9f7f6c84aa feat(nodeToolbarComponent): add functionality to download node as JSON file
feat(reactflowUtils): add functions to create a flow component and download a node as a JSON file

The changes in `nodeToolbarComponent` include importing the `downloadNode` function from `reactflowUtils` and adding a case in the switch statement to call the `downloadNode` function when the action is "SaveAll". This allows the user to download the node as a JSON file.

In `reactflowUtils`, two new functions are added. The `createFlowComponent` function takes in node data and creates a flow component with the necessary structure. The `downloadNode` function takes a flow component and converts it into a JSON file that can be downloaded by the user.
2023-09-22 15:18:52 -03:00
Gabriel Luiz Freitas Almeida
1c0f18f897 🔧 fix(__main__.py): update import statements to reflect changes in module structure
🔧 fix(endpoints.py): update import statement to reflect changes in module structure
🔧 fix(flows.py): update import statements to reflect changes in module structure
🔧 fix(login.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(custom_component.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure
🔧 fix(base.py): update import statement to reflect changes in module structure

🔧 fix(process.py): update import statement for get_session_service in langflow.processing.process module to reflect correct module location
🔧 fix(utils.py): update import statement for get_session and get_settings_service in langflow.services.auth.utils module to reflect correct module location
🔧 fix(manager.py): update import statement for ServiceType.CACHE_MANAGER in langflow.services.chat.manager module to reflect correct module location
🔧 fix(manager.py): update import statement for ServiceType.DATABASE_MANAGER in langflow.services.chat.manager module to reflect correct module location
🔧 fix(utils.py): update import statement for get_settings_service in langflow.services.database.manager module to reflect correct module location
🔧 fix(utils.py): update import statement for get_settings_service in langflow.services.database.utils module to reflect correct module location
🔧 fix(getters.py): update import statement for DatabaseManager, SettingsManager, ChatManager in langflow.services.getters module to reflect correct module location
🔧 fix(getters.py): update import statement for get_settings_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_db_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_chat_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_settings_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_db_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_session in langflow.services.getters module to reflect correct function name change
🔧 fix(getters.py): update import statement for get_chat_manager in langflow.services.getters module to reflect correct function name change
🔧 fix(langfuse.py): update import statement for get_settings_service in langflow.services.plugins.langfuse module to reflect correct module location
🔧 fix(schema.py): update import statement for ServiceType.AUTH_MANAGER, ServiceType.CACHE_MANAGER, ServiceType.SETTINGS_MANAGER, ServiceType.DATABASE_MANAGER, ServiceType.CHAT_MANAGER, ServiceType.SESSION_MANAGER, ServiceType.TASK_MANAGER in langflow.services.schema module to reflect correct module location
🔧 fix
2023-09-22 14:56:16 -03:00
Gabriel Luiz Freitas Almeida
b3febf25dd Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 14:50:19 -03:00
anovazzi1
7f3d57bfaa fix(nodeToolbarComponent): refactor handleSelectChange function to use switch statement for better readability and maintainability
feat(nodeToolbarComponent): add "SaveAll" option to the select dropdown and log a message when selected
2023-09-22 14:46:01 -03:00
DiogenesBR
2f5dba1210 File loader 2023-09-22 17:36:40 +00:00
anovazzi1
742ebae878 feat(nodeToolbarComponent): add "Save" option to the select dropdown in the node toolbar component to allow saving changes made to the node
fix(styleUtils): import the "SaveAll" icon from lucide-react to be used in the nodeIconsLucide object
2023-09-22 14:32:43 -03:00
anovazzi1
758d5ac9d3 fix(EditFlowSettingsComponent): fix issue with invalidName state not updating correctly when input value is changed 2023-09-22 14:09:44 -03:00
Gabriel Luiz Freitas Almeida
05b1f3658e 🔧 chore(frontend): add newline at the end of package-lock.json file to adhere to coding conventions 2023-09-22 14:05:46 -03:00
Gabriel Luiz Freitas Almeida
73e78b6b68 🔀 merge(listing.py): merge changes from types.py to improve code organization and readability
🔀 merge(types.py): merge changes from listing.py to consolidate all type dictionaries into a single function for better maintainability and readability
2023-09-22 14:03:15 -03:00
Gabriel Luiz Freitas Almeida
df9c8c05b5 🔧 refactor(utils.py): remove unused functions merge_nested_dicts and merge_nested_dicts_with_renaming to improve code readability and maintainability
🔧 refactor(endpoints.py): remove unused imports and functions build_langchain_types_dict, build_langchain_template_custom_component, and build_langchain_custom_component_list_from_path to improve code readability and maintainability

 feat(endpoints.py): add error handling to get_all endpoint to return a 500 status code with the exception message if an error occurs during the retrieval of langchain types dict
2023-09-22 14:03:00 -03:00
Gabriel Luiz Freitas Almeida
dcd9d3a23e 🐛 fix(__init__.py): rename service_service to service_manager for better semantics
🐛 fix(manager.py): rename service_service to service_manager for better semantics
🐛 fix(manager.py): rename ServiceService class to ServiceManager for better semantics
🐛 fix(manager.py): rename service_service variable to service_manager for better semantics
🐛 fix(utils.py): rename service_service to service_manager for better semantics
 feat(manager.py): add support for service_manager to manage creation of different services
 feat(manager.py): add support for service_manager to update services
 feat(manager.py): add support for service_manager to teardown services
 feat(manager.py): add support for service_manager to register and update factories
 feat(manager.py): add support for service_manager to initialize and reinitialize services
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py): add support for service_manager to get services by type
 feat(manager.py
2023-09-22 13:08:57 -03:00
Gabriel Luiz Freitas Almeida
78ecb4c341 Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 12:53:05 -03:00
Gabriel Luiz Freitas Almeida
6151052b18
Merge branch 'dev' into add_cli_options_superuser 2023-09-22 12:48:26 -03:00
Gabriel Luiz Freitas Almeida
43df53363d Merge remote-tracking branch 'origin/main' into dev 2023-09-22 12:44:46 -03:00
Gabriel Luiz Freitas Almeida
f8b38ee162 🐛 fix(process.py): rename langchain_object variable to graph for better semantics
🐛 fix(process.py): rename langchain_object variable to built_object in generate_result function for better semantics
🐛 fix(process.py): update session with graph instead of langchain_object to reflect changes
 feat(manager.py): add reinitialize_services function to reinitialize all services
 feat(utils.py): initialize settings service if not already initialized before returning it
2023-09-22 11:00:57 -03:00
Gabriel Luiz Freitas Almeida
04fe2f6054 📝 chore(utils.py): add utility function to check if an object is a basic type
📝 chore(loading.py): refactor code to improve readability and maintainability
📝 chore(vector_store.py): refactor code to improve readability and maintainability
📝 chore(run.py): update return type hint for build_sorted_vertices function
2023-09-22 10:59:53 -03:00
Gabriel Luiz Freitas Almeida
bea1328a3e 🐛 fix(base.py): add __setstate__ method to Edge class to properly set state when unpickling
🐛 fix(base.py): add reset method to Edge class to reset source and target params when needed
🐛 fix(base.py): add __setstate__ method to Graph class to properly set state when unpickling
🐛 fix(base.py): add __eq__ method to Graph class to compare graphs based on their string representation
🐛 fix(types.py): add __getstate__ and __setstate__ methods to AgentVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to ToolVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to LLMVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to ToolkitVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to FileToolVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to DocumentLoaderVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to EmbeddingVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to VectorStoreVertex class to properly set and get state when pickling and unpickling
🐛 fix(types.py): add __getstate__ and __setstate__ methods to TextSplitterVertex class to properly set and get state when pickling and unpickling
 feat(types.py): add reset method to AgentVertex class to reset source and target params when needed
 feat(types.py): add reset method to ToolVertex class to reset source and target params when needed
 feat(types.py): add reset method to LLMVertex class to reset source and target params when needed
 feat(types.py):
2023-09-22 10:58:27 -03:00
Gabriel Luiz Freitas Almeida
2b10cfe96d 🐛 fix(base.py): add missing import statement for is_basic_type function
🐛 fix(base.py): add missing import statement for logger
🐛 fix(base.py): handle AttributeError when comparing Vertex objects for equality
🐛 fix(base.py): handle exception and log it when building node fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): reset params and rebuild built object when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object fails
🐛 fix(base.py): handle exception and log it when pickling built object
2023-09-22 10:54:30 -03:00
Gabriel Luiz Freitas Almeida
df19298637 🐛 fix(cache/manager.py): unpickle cached value before returning it to fix deserialization issue
🐛 fix(cache/manager.py): pickle value before caching it to mimic Redis behavior
🐛 fix(cache/manager.py): raise ValueError if RedisCache fails to set the value
🐛 fix(session/manager.py): generate key if it is None before checking cache
 feat(session/manager.py): add logging import to enable logging in the session manager
2023-09-22 10:48:13 -03:00
Gabriel Luiz Freitas Almeida
3412e8a92c 🔧 chore(celery_app.py): modify make_celery function signature to accept a config parameter
🔧 chore(celery_app.py): update celery_app.config_from_object argument to use the config parameter passed to make_celery function
2023-09-22 10:47:35 -03:00
Gabriel Luiz Freitas Almeida
358f5c9019 🐛 fix(endpoints.py): fix indentation issue in process_flow function and assign session_id correctly when result is a dictionary 2023-09-22 10:46:36 -03:00
Gabriel Luiz Freitas Almeida
f01f4a809e 🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
🔨 refactor(worker.py): rename langchain_object variable to built_object to improve semantics
🔨 refactor(worker.py): rename langchain_object variable to graph for better clarity
2023-09-22 10:45:02 -03:00
anovazzi1
c9d7e72a08 clone deep to avoid ctrl-z bug on ungroup component 2023-09-21 21:35:23 -03:00
anovazzi1
f63a19578b update lock file 2023-09-21 21:28:19 -03:00
anovazzi1
795bf73752
Filter Menu Components on Click Edge (#932)
This branch implements the edge filtering feature.
2023-09-21 21:08:47 -03:00
anovazzi1
8275a9c2c1 chore(parameterComponent): remove unnecessary ts-ignore comments
fix(extraSidebarComponent): remove unnecessary if condition in handleBlur function
2023-09-21 21:00:17 -03:00
anovazzi1
0192d3461d fix(chatComponent): import processFlow function from reactflowUtils to fix reference error
fix(chatComponent): update validation check to use processFlow function to correctly count nodes
fix(formModal): remove unnecessary spread operator on processFlow function call
fix(reactflowUtils): update getGroupStatus function to correctly return status based on ssData
2023-09-21 20:43:02 -03:00
anovazzi1
a12a7fd1cc
New "more" nodeToolbar button (#952)
This PR introduces a new feature to enhance the editing capabilities of
nodes in our application. We've added a "More" button to the
nodeToolbar, which, when clicked, reveals additional options for editing
nodes.
2023-09-21 20:05:41 -03:00
anovazzi1
1796e349c2 fix(nodeToolbarComponent): fix indentation and formatting issues in the code
feat(nodeToolbarComponent): add support for minimal mode in the toolbar
feat(nodeToolbarComponent): add functionality to show/hide advanced options in the toolbar
2023-09-21 20:03:47 -03:00
anovazzi1
b18a91deb0 code format 2023-09-21 19:23:53 -03:00
anovazzi1
187724342f update message format to put api-key as header 2023-09-21 19:23:53 -03:00
igorrCarvalho
ac67fff000 Refactor: Make changes to api_key only show up in codetabs when authenticated 2023-09-21 19:23:53 -03:00
igorrCarvalho
b1ef10e79b Refactor: update Code Tabs PopUp with api_key 2023-09-21 19:23:53 -03:00
igorrCarvalho
7cead25c8b Remove console.log 2023-09-21 19:07:50 -03:00
igorrCarvalho
2c2197ecad Refactor: Make minimize button show up in the More button popup 2023-09-21 19:06:30 -03:00
igorrCarvalho
b7b7a93cdd formated code 2023-09-21 15:20:36 -03:00
igorrCarvalho
e4ba7364bb merge dev into feat-more 2023-09-21 15:17:08 -03:00
Gabriel Luiz Freitas Almeida
0555c6a371 🔀 refactor(base.py): process graph data before building the graph to ensure consistency and correctness
🔀 refactor(base.py): update nodes and edges after processing graph data to reflect changes in the graph structure
2023-09-21 14:51:13 -03:00
Gabriel Luiz Freitas Almeida
72f64caa41 🐛 fix(base.py): import process_flow function to fix NameError in Graph class
 feat(utils.py): add process_flow function to recursively process and ungroup nodes in a flow object
2023-09-21 14:44:10 -03:00
Gabriel Luiz Freitas Almeida
6ec51a0d22 🔀 refactor(endpoints.py): rename process_flow function to process for better naming consistency and clarity 2023-09-21 14:43:47 -03:00
Gabriel Luiz Freitas Almeida
ddd480fb23 🐛 fix(tabsContext.tsx): handle null or undefined flow.description to prevent potential errors 2023-09-21 12:57:08 -03:00
Cristhian Zanforlin Lousa
610e94759a 🐛 fix(api.tsx): update Authorization header to use access_token from cookies instead of accessToken variable to fix authentication issue 2023-09-21 11:50:01 -03:00
anovazzi1
8f01f5c838 chore(example.spec.ts): remove example.spec.ts test file
The example.spec.ts test file was removed as it is no longer needed.
2023-09-21 11:02:37 -03:00
anovazzi1
d9073aba39 refactor(tabsContext.tsx): rename processFlowEdges and processFlowNodes functions to processDataFromFlow to improve clarity and consistency
refactor(tabsContext.tsx): remove console.log statement for old edges
refactor(tabsContext.tsx): add comments to indicate updating edges colors and baseclasses in edges
refactor(tabsContext.tsx): add comments to indicate updating baseclasses in edges
refactor(tabsContext.tsx): add comments to indicate adding animation to text type edges
refactor(tabsContext.tsx): update updateIds function to handle GroupNode type nodes
refactor(reactflowUtils.ts): update updateIds function to handle GroupNode type nodes
refactor(reactflowUtils.ts): update updateIds function to handle sourceHandle and targetHandle ids in edges
2023-09-21 10:56:50 -03:00
igorrCarvalho
3cbe046e08 Refactor: Disable signUp button when form is invalid 2023-09-21 10:54:20 -03:00
anovazzi1
bf1597a9f4 refactor(tabsContext.tsx): simplify code in TabsProvider component
The changes in this commit simplify the code in the TabsProvider component in the tabsContext.tsx file. Here's a summary of the changes:

- In the `createNewFlow` function, the `flowData` parameter is now of type `ReactFlowJsonObject | null` instead of `{ data: ReactFlowJsonObject | null; description: string }`. This simplifies the function signature and removes the need for destructuring the `flowData` object.
- The `extractDataFromFlow` function has been renamed to `processDataFromFlow` to better reflect its purpose. The function now returns only the `data` property from the `flow` object instead of an object with `data` and `description` properties.
- The `description` property in the `createNewFlow` function is now set to `flow.description ?? getRandomDescription()`. This ensures that if the `flow` object has a `description` property, it is used, otherwise a random description is generated.
- The `processFlowEdges` and `processFlowNodes` functions are no longer called in the `createNewFlow` function. It seems that these functions are defined elsewhere and are not necessary in this context.

These changes simplify the code and improve readability by removing unnecessary checks and simplifying function signatures.
2023-09-21 10:30:59 -03:00
anovazzi1
577046523a fix(tabsContext.tsx): change parameter type of newProject in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs
fix(tabsContext.tsx): change parameter type of newProject in addFlow function from optional Boolean to required Boolean to improve clarity and prevent potential bugs
fix(extraSidebarComponent/index.tsx): change argument of uploadFlow function from undefined to false to fix a bug where uploadFlow was not being called correctly
fix(tabs/index.ts): change parameter type of newFlow in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs
2023-09-21 10:08:12 -03:00
Gabriel Luiz Freitas Almeida
1ebf4e5b24 🔧 chore(langfuse.py): add support for configurable Langfuse host to improve flexibility and maintainability 2023-09-21 06:41:23 -03:00