Commit graph

7,638 commits

Author SHA1 Message Date
anovazzi1
56c2be5867 fix(api.tsx): remove unnecessary try-catch block and add error logging for better debugging
fix(index.ts): remove console.log statement for error logging
2023-10-05 18:04:21 -03:00
anovazzi1
03d12b53cd fix(formModal/index.tsx): update updateLastMessage function to include prompt value when data.type is "end"
fix(formModal/index.tsx): update template.current value when data.type is "prompt" and data.prompt is provided
fix(formModal/index.tsx): remove unnecessary updateLastMessage call when data.type is "stream" and isStream is true
2023-10-05 17:55:44 -03:00
Gabriel Luiz Freitas Almeida
57b9ab6843 🐛 fix(manager.py): change try-except block to if-elif block to improve code readability and maintainability 2023-10-05 17:41:10 -03:00
Gabriel Luiz Freitas Almeida
df8dd44a16 🐛 fix(manager.py): remove unnecessary exception handling and logging for JSON decoding error
🐛 fix(manager.py): fix condition for clearing chat history to only clear if "clear_history" key is present and its value is truthy
2023-10-05 17:39:56 -03:00
Gabriel Luiz Freitas Almeida
10d79fcbec 🔧 refactor(buildTrigger/index.tsx): remove unused processFlow function to improve code readability and maintainability
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'finished' variable and while loop to simplify code logic
🔧 refactor(buildTrigger/index.tsx): remove unnecessary return statement and resolve/reject promises directly to improve code readability
🔧 refactor(buildTrigger/index.tsx): remove unused 'isValid' variable and directly push validation results to 'validationResults' array
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'else' statements and simplify code logic
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setProgress' function call and directly set progress value
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setSuccessData' and 'setErrorData' function calls and directly set success and error data values
🔧 refactor(buildTrigger/index.tsx): remove unnecessary type assertion for 'setTabsState' function call
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setIsBuilding' function call
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'eventSource.close()' function call in 'onerror' event handler
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'resolve' function call in 'onmessage' event handler
2023-10-05 14:49:58 -03:00
Gabriel Luiz Freitas Almeida
06bbfa2e04 🐛 fix(utils.py): fix find_last_node function to receive nodes and edges as arguments instead of data dictionary
🐛 fix(utils.py): fix update_source_handle function to receive g_nodes and g_edges as arguments instead of flow_data
🐛 fix(utils.py): fix get_updated_edges function to receive g_nodes and g_edges as arguments instead of base_flow and group_node_id
 feat(utils.py): add support for passing nodes and edges as arguments to find_last_node, update_source_handle, and get_updated_edges functions to improve reusability and modularity
2023-10-05 13:08:09 -03:00
Gabriel Luiz Freitas Almeida
01438d82e0 🐛 fix(base.py): add exception logging to provide more information in case of KeyError
🐛 fix(utils.py): fix bug where ungrouped nodes were not added to the queue for future processing
 feat(utils.py): add functionality to keep track of processed nodes to avoid duplicate processing
 feat(utils.py): add functionality to process nodes in a breadth-first manner to ensure correct order of processing
 feat(utils.py): add functionality to update source handles correctly when ungrouping nodes
2023-10-05 12:34:54 -03:00
Gabriel Luiz Freitas Almeida
de7c80de3f 🐛 fix(utils.py): refactor update_template function to improve readability and maintainability
 feat(utils.py): add support for nested proxy dictionary in template to handle field and id separately
 test(test_graph.py): add test cases for process_flow function to ensure correct processing of grouped chat data
 test(test_graph.py): add test cases for update_template function to ensure correct updating of template
2023-10-05 11:40:40 -03:00
anovazzi1
15a6eb58b1 refactor(reactflowUtils.ts): remove unnecessary code that hides the "code" template for CustomComponent
The code was removing the "code" template for CustomComponent by setting its "show" property to false. However, this code is no longer needed and has been removed to simplify the logic and improve maintainability.
2023-10-04 21:46:34 -03:00
anovazzi1
39ddc8eed4 update proxy field on clean edges 2023-10-04 21:12:58 -03:00
Gabriel Luiz Freitas Almeida
20555a4e88 🐛 fix(base.py): remove unused process_flow function call in Graph class to improve code readability and performance
🐛 fix(utils.py): change condition from `node["data"]["node"]["flow"]` to `node["data"]["node"].get("flow")` to handle cases where "flow" key is missing in node data

🐛 fix(utils.py): fix incorrect variable name in get_updated_edges function, change `new_edge` to `edge` in the condition
2023-10-04 20:45:29 -03:00
anovazzi1
64dbdc0e9d fix bug on expand and ungroup that does not update connected edges with proxy 2023-10-04 20:10:33 -03:00
Gabriel Luiz Freitas Almeida
7d633d853d 🐛 fix(chat.py): remove unnecessary blank line to improve code readability
🐛 fix(chat.py): remove unused variable 'valid' to improve code readability
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py): fix indentation of 'yield' statement to match the surrounding code
🐛 fix(chat.py
2023-10-04 18:46:20 -03:00
Gabriel Luiz Freitas Almeida
3183c52594 🔧 chore(constants.py): update CLASSES_TO_REMOVE list to include "RunnableSerializable" class
The "CLASSES_TO_REMOVE" list in the constants.py file has been updated to include the "RunnableSerializable" class. This change was made to ensure that the "RunnableSerializable" class is properly removed when processing the list of classes to remove.
2023-10-04 17:42:41 -03:00
Gabriel Luiz Freitas Almeida
537e1a3e05 🔧 chore(utils.py): refactor get_factories_and_deps function to improve code organization and readability
🔧 chore(utils.py): refactor initialize_services function to use the updated get_factories_and_deps function for better maintainability
2023-10-04 17:42:26 -03:00
Gabriel Luiz Freitas Almeida
79334a10de 🔧 chore(callback.py): refactor StreamingLLMCallbackHandler constructor to improve code readability and maintainability
🐛 fix(callback.py): assign websocket attribute from chat_service.active_connections to self.websocket to avoid potential bugs
2023-10-04 17:42:12 -03:00
Gabriel Luiz Freitas Almeida
0b2cfb3bbe 🐛 fix(agents.py): change 'required' attribute of 'Tool' field in InitializeAgentNode class from False to True to enforce its presence 2023-10-04 17:24:41 -03:00
anovazzi1
8ac9a70c68 feat(nodeToolbarComponent): add "Share" option to node toolbar menu for future implementation of sharing functionality
fix(nodeToolbarComponent): remove unnecessary comment and code duplication in the "Download" case of the switch statement
2023-10-04 15:48:38 -03:00
Gabriel Luiz Freitas Almeida
75319a4579 🔧 chore(alembic): import sqlmodel module to satisfy linter and improve code readability 2023-10-04 15:44:29 -03:00
anovazzi1
c9724d0fb4 added custom component template 2023-10-04 15:37:41 -03:00
anovazzi1
71bc3c4a65 formated code 2023-10-04 15:37:41 -03:00
anovazzi1
3c77728709 created test to save flow and fix bug on nested dict 2023-10-04 15:37:41 -03:00
Gabriel Luiz Freitas Almeida
358d595b36
Release beta 6 (#1012) 2023-10-04 14:52:42 -03:00
Gabriel Luiz Freitas Almeida
203929914e 🐛 fix(utils.py): remove unnecessary password verification when creating a superuser
💡 refactor(utils.py): simplify logic for creating a superuser by removing redundant password verification
2023-10-04 14:51:18 -03:00
Gabriel Luiz Freitas Almeida
eb1e742029
Change prefix of generated API key from "lf" to "sk"
🔄 refactor(api_key/crud.py): change prefix of generated API key from "lf" to "sk" for better readability and consistency
2023-10-04 13:54:45 -03:00
Gabriel Luiz Freitas Almeida
3403ee3c1c 🔄 refactor(api_key/crud.py): change prefix of generated API key from "lf" to "sk" for better readability and consistency 2023-10-04 13:54:09 -03:00
Gabriel Luiz Freitas Almeida
6c45b6393f
🐛 fix(endpoints.py): replace backend type string with backend name to improve readability and semantics (#1010) 2023-10-04 13:42:42 -03:00
Gabriel Luiz Freitas Almeida
997639e325 🐛 fix(endpoints.py): replace backend type string with backend name to improve readability and semantics
 feat(anyio.py): add name attribute to AnyIOBackend class to identify the backend by name
 feat(celery.py): add name attribute to CeleryBackend class to identify the backend by name
 feat(manager.py): add backend_name property to TaskService class to get the name of the backend
2023-10-04 13:40:51 -03:00
Gabriel Luiz Freitas Almeida
a308585d01
fix callback use client_id (#993) 2023-10-04 12:53:55 -03:00
Gabriel Luiz Freitas Almeida
62711a08cd 🔧 chore(server.py): configure gunicorn to use UvicornWorker as the worker class for improved performance and compatibility 2023-10-04 12:49:30 -03:00
Gabriel Luiz Freitas Almeida
f9d9adf60b 🐛 fix(manager.py): catch and log exceptions when tearing down services to prevent silent failures
🐛 fix(utils.py): catch and log exceptions when tearing down services and superuser to prevent silent failures
2023-10-04 12:49:10 -03:00
Gabriel Luiz Freitas Almeida
e72c04a94a 🐛 fix(__main__.py): set OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable on MacOS to avoid error when running gunicorn
 feat(__main__.py): load environment variables from .env file to override existing environment variables
2023-10-04 12:48:30 -03:00
Gabriel Luiz Freitas Almeida
f229524cf5 🐛 fix(__main__.py): change default number of worker processes from 2 to 1 to improve performance 2023-10-04 10:34:37 -03:00
Gabriel Luiz Freitas Almeida
0a61f389c8 🔧 chore(manager.py): remove unused initialize_services function
🔧 chore(utils.py): refactor initialize_services function to use a list of factory and dependencies for better readability and maintainability
2023-10-04 10:20:47 -03:00
Gabriel Luiz Freitas Almeida
a6b30e1b8b 🔧 chore(alembic): change columns to be nullable in migration script
🔧 chore(api_key.py): make last_used_at field nullable in ApiKeyBase model

🔧 chore(flow.py): make data field nullable in FlowBase model

🔧 chore(user.py): make profile_image field nullable in User model
2023-10-04 10:20:32 -03:00
Gabriel Luiz Freitas Almeida
78c54d6736 🐛 fix(manager.py): handle table creation errors and log warnings for existing tables
 feat(manager.py): improve table creation process by checking if tables already exist before creating them
2023-10-04 09:03:03 -03:00
Gabriel Luiz Freitas Almeida
3724876620 🐛 fix(utils.py): remove unnecessary check for None value in handle_partial_variables function
🔀 refactor(utils.py): simplify dictionary comprehension in handle_partial_variables function
2023-10-03 22:14:32 -03:00
Gabriel Luiz Freitas Almeida
d01d8c2945 Merge branch 'fix_tests' into session_id 2023-10-03 21:43:51 -03:00
Gabriel Luiz Freitas Almeida
f25e390e8c 🐛 fix(utils.py): handle_partial_variables now filters out partial variables with None values to prevent errors in LangChain 2023-10-03 21:33:45 -03:00
Gabriel Luiz Freitas Almeida
2b7062a3ec 🔧 chore(chat.py): refactor error logging in try_running_celery_task function to improve readability and reduce noise
🐛 fix(chat.py): change error logging level from error to debug in try_running_celery_task function to reduce noise
2023-10-03 21:32:25 -03:00
anovazzi1
0c513abf24 feat(extraSidebarComponent): add support for passing apiClass prop to SidebarDraggableComponent to enable dynamic rendering of API class components
feat(sideBarDraggableComponent): add support for downloading node on "download" option click in the sidebar
fix(sideBarDraggableComponent): fix missing import statements and add missing type annotations
2023-10-03 20:24:40 -03:00
anovazzi1
c67d7da5e2 fix(typesContext.tsx): import Edge from reactflow to fix missing type declaration
feat(typesContext.tsx): add deleteEdge function to typesContext to delete edges from reactFlowInstance
fix(PageComponent/index.tsx): add deleteEdge function to delete selected edges from typesContext
2023-10-03 19:46:22 -03:00
anovazzi1
02f2988821 fix(typesContext.tsx): remove unnecessary console.log statement
fix(extraSidebarComponent/index.tsx): import sensitiveSort function from utils and use it for sorting
feat(utils.ts): add sensitiveSort function for sorting strings in a case-sensitive manner
2023-10-03 18:39:10 -03:00
Gabriel Luiz Freitas Almeida
9c70a3fe20 🐛 fix(manager.py): add inspector to check if table "flow" exists before creating tables again
The change was made to fix a bug where the tables were being recreated even if they already existed. By adding an inspector to check if the table "flow" exists before recreating the tables, we can prevent unnecessary table creation and improve performance.
2023-10-03 18:13:41 -03:00
Gabriel Luiz Freitas Almeida
6618efc409 🔨 refactor(base.py): remove unused import from langchain module in base.py
🔨 refactor(base.py): remove unused import from langchain.utilities module in base.py
🔨 refactor(base.py): remove unused import from langchain.requests module in base.py
🔨 refactor(base.py): remove unused import from langchain.sql_database module in base.py
2023-10-03 17:59:48 -03:00
anovazzi1
d0cdcc0f22 feat(typesContext.tsx): add deleteComponent function to typesContext to allow deleting components from savedComponentsJSON
fix(extraSidebarComponent/index.tsx): update references to data object to use dataFilter object to prevent errors when filtering data
fix(sideBarDraggableComponent/index.tsx): add deleteComponent function from typesContext to handleSelectChange function to delete components
2023-10-03 17:42:05 -03:00
Gabriel Luiz Freitas Almeida
dc559e61ae 🐛 fix(manager.py): refactor create_db_and_tables method to check if database and tables already exist before creating them 2023-10-03 17:39:50 -03:00
anovazzi1
3abbd5c5e4 refactor(sideBarDraggableComponent): remove unused useRef and useState hooks to simplify code
feat(sideBarDraggableComponent): add right-click functionality to open the select menu for additional options
2023-10-03 17:19:20 -03:00
Gabriel Luiz Freitas Almeida
a8f444656b
Release 0.5.0a5 (#1000) 2023-10-03 17:09:51 -03:00
Gabriel Luiz Freitas Almeida
ad406541f2 🐛 fix(manager.py): improve readability by splitting a long line into multiple lines
🐛 fix(utils.py): add comment to explain the reason for the check
2023-10-03 17:08:38 -03:00