Commit graph

6,039 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
a68535cbe4 🐛 fix(users.py): prevent users from changing their password in the patch_user endpoint to ensure security
🐛 fix(users.py): prevent users from using their current password when resetting their password to ensure security
2023-09-08 16:42:56 -03:00
anovazzi1
4d5447ed65 feat(reactflowUtils.ts): add functions to handle connected input nodes and ungroup nodes
The `connectedInputNodesOnHandle` function is added to retrieve the nodes connected to the input handle of a given node. It takes the `nodeId`, `handleId`, `nodes`, and `edges` as parameters and returns an array of connected nodes.

The `ungroupNode` function is added to ungroup a group node. It takes the `groupNode` and `BaseFlow` as parameters and updates the edges and nodes in the `BaseFlow` to redirect the edges to the correct proxy node.

The `processFLow` function is added to process the flow object recursively. It clones the flow object and iterates through the nodes to ungroup any group nodes and update the edges and nodes accordingly.

Note: No newline at the end of the file.
2023-09-08 16:16:01 -03:00
Gabriel Luiz Freitas Almeida
01a289dd9a 🐛 fix(users.py): assign the hashed new password to a variable before updating the user's password to ensure consistency
 test(test_user.py): add test to verify if the new password works after resetting it
2023-09-08 14:28:32 -03:00
Gabriel Luiz Freitas Almeida
f95a38a4b5 🐛 fix(crud.py): change HTTP status code from 304 to status.HTTP_304_NOT_MODIFIED for better readability and consistency
 feat(crud.py): add support for updating user profile image in the update_user function
 feat(test_user.py): add test case for updating user profile image in the test_patch_user function
2023-09-08 14:23:19 -03:00
Gabriel Luiz Freitas Almeida
75f03b17f4 🔧 chore(67cc006d50bf_add_profile_image_column.py): refactor upgrade and downgrade functions to check if "user" table exists and if "profile_image" column is already present before adding or dropping the column respectively 2023-09-08 14:19:28 -03:00
Gabriel Luiz Freitas Almeida
071ad8621b 🔧 chore(user.py): add optional profile_image field to UserRead model for improved user profile functionality 2023-09-08 14:13:54 -03:00
Lucas Oliveira
bd44500508 Added gradient chooser and success messages 2023-09-08 13:08:39 -03:00
anovazzi1
056cf6f66d refactor(api/index.ts): remove unused variable property from APITemplateType
fix(utils/reactflowUtils.ts): import TemplateVariableType from types/api
feat(utils/reactflowUtils.ts): add mergeNodeTemplates function to merge node templates and update display names
feat(utils/reactflowUtils.ts): add isHandleConnected function to check if a handle is connected to an edge
refactor(utils/reactflowUtils.ts): remove TODO comments and update comments for mergeNodeTemplates and isHandleConnected functions
feat(utils/reactflowUtils.ts): add generateNodeTemplate function to generate node templates from a flow
2023-09-08 12:24:04 -03:00
anovazzi1
8cdfb00af6 chore(reactflowUtils.ts): add TODO comment to update to new types
feat(reactflowUtils.ts): add function to update group node template to set visibility of basic types to advanced true
feat(reactflowUtils.ts): add function to generate node template for group node based on flow data
feat(reactflowUtils.ts): add function to generate node from flow data
2023-09-08 12:17:28 -03:00
anovazzi1
e129b3c9f4 refactor(reactflowUtils.ts): extract validation logic into a separate function for better code organization and reusability
feat(reactflowUtils.ts): add validateSelection function to validate the selection of nodes and edges in the React Flow instance
2023-09-08 12:13:40 -03:00
anovazzi1
0df8427e3f refactor(api/index.ts): add FlowType import to improve code readability and maintainability
feat(reactflowUtils.ts): add concatFlows function to concatenate nodes and edges from a FlowType object to a ReactFlowInstance

feat(reactflowUtils.ts): add generateNodeFromFlow function to generate a NodeType object from a FlowType object
2023-09-08 12:11:06 -03:00
anovazzi1
2e7f362867 feat(reactflowUtils.ts): add findLastNodeType type to represent the input for findLastNode function
feat(reactflowUtils.ts): add filterFlow function to filter out selected nodes and edges from the flow
feat(reactflowUtils.ts): add updateFlowPosition function to update the position of nodes in the flow based on a new position
fix(reactflowUtils.ts): fix return type of generateFlow function to use generateFlowType type instead of inline type definition
2023-09-08 12:02:41 -03:00
anovazzi1
67e364ef35 fix(reactflowUtils.ts): import missing FlowType from "../flow" in reactflowUtils.ts
feat(reactflowUtils.ts): add generateFlow function to generate a new flow based on selected nodes and edges
2023-09-08 11:37:35 -03:00
anovazzi1
ccb8b0d323 feat(reactflowUtils.ts): add getMiddlePoint function to calculate the average position of multiple nodes
The getMiddlePoint function calculates the average position of multiple nodes by summing up the x and y coordinates of each node and dividing them by the total number of nodes. This allows us to find the middle point or center of a group of nodes. This function can be used to determine the position of a new node based on the average position of existing nodes.
2023-09-08 11:27:04 -03:00
Lucas Oliveira
b770622603 Added gradient and changed types of patch user 2023-09-08 11:23:57 -03:00
Cristhian Zanforlin Lousa
e6afd6704f 🐛 fix(floatComponent): fix typo in max variable assignment to remove unnecessary plus sign 2023-09-08 10:46:09 -03:00
Cristhian Zanforlin Lousa
ec7a5fdbd6 🐛 fix(floatComponent): update min and max values to -2 and +2 respectively for better range
🔧 chore(floatComponent): update placeholder text to reflect the new range of -2 to 2
2023-09-08 10:45:43 -03:00
Cristhian Zanforlin Lousa
0aa39d8a8e 🐛 fix(parameterComponent): import DictComponent from correct path to fix module not found error
🐛 fix(parameterComponent): remove unused import of CodeAreaComponent to improve code readability
🐛 fix(parameterComponent): remove unused import of TabsContext to improve code readability
🐛 fix(parameterComponent): remove unused import of typesContext to improve code readability
🐛 fix(parameterComponent): remove unused import of TabsState to improve code readability
🐛 fix(parameterComponent): remove unused import of nodeColors to improve code readability
🐛 fix(parameterComponent): remove unused import of nodeIconsLucide to improve code readability
🐛 fix(parameterComponent): remove unused import of nodeNames to improve code readability
🐛 fix(parameterComponent): remove unused import of classNames to improve code readability
🐛 fix(parameterComponent): remove unused import of groupByFamily to improve code readability
🐛 fix(parameterComponent): remove unused import of useUpdateNodeInternals to improve code readability
🐛 fix(parameterComponent): remove unused import of Position from reactflow to improve code readability
🐛 fix(parameterComponent): remove unused import of Handle from reactflow to improve code readability
🐛 fix(parameterComponent): remove unused import of types from reactflow to improve code readability
🐛 fix(parameterComponent): remove unused import of React from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useEffect from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useContext from react to improve code readability
🐛 fix(parameterComponent): remove unused import of ReactNode from react to improve code readability
🐛 fix(parameterComponent): remove unused import of forwardRef from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useEffect from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
🐛 fix(parameterComponent): remove unused import of useState from react to improve code readability
2023-09-08 10:11:32 -03:00
Cristhian Zanforlin Lousa
afc1888d73 🎨 style(dictAreaModal): update BaseModal size prop value to "medium-h-full" for better UI layout 2023-09-08 10:00:59 -03:00
Gabriel Luiz Freitas Almeida
04544b172f 🚀 feat(alembic): add migration to add profile_image column to user table
🔧 chore(user.py): add profile_image field to User model for storing user profile images
2023-09-08 07:36:56 -03:00
Guangya Liu
86cf771d00 Fix lint error 2023-09-07 14:57:37 -04:00
Matheus Jacques
87339b9442 Fix images and remove depends_on 2023-09-07 16:47:08 +02:00
dependabot[bot]
9a5dbb59fc
chore(deps): bump gitpython from 3.1.32 to 3.1.34
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.32 to 3.1.34.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.32...3.1.34)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 18:37:56 +00:00
igorrCarvalho
5cae58dead Refactor: Remove blank space when node has no description 2023-09-06 14:44:13 -03:00
Lucas Oliveira
512db102fa Change password implemented, but not working 2023-09-06 14:16:07 -03:00
Niklas
8bde788d37 updated Makefile to use langflow run 2023-09-05 23:41:17 +02:00
igorrCarvalho
f44b0e33b1 remove unnused imports 2023-09-05 18:31:30 -03:00
igorrCarvalho
25949b97a7 Fix: user not having icon when id starts with a letter 2023-09-05 18:31:30 -03:00
Gabriel Luiz Freitas Almeida
49167a58a9 🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users" for consistency and clarity
 feat(tests): add assertion for response status code 201 after creating a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users/whoami" to fetch the updated user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 401 and detail message after fetching the updated user
 feat(tests): add assertion for response status code 200 after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 200 and detail message after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 304 after patching user data
 feat(tests): add assertion for response status code 200 after resetting user password
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 422 and detail message after patching user data with wrong id
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response
2023-09-05 17:19:46 -03:00
Gabriel Luiz Freitas Almeida
a7db386277 🐛 fix(users.py): change route paths for user-related endpoints to improve consistency and readability
 feat(users.py): add support for resetting a user's password
🐛 fix(crud.py): fix update_user function to properly handle unchanged attributes and return 304 status code if nothing is updated
🐛 fix(user.py): change field name in UserUpdate model from 'username' to 'password' to reflect the intended functionality
🐛 fix(index.ts): update API routes in frontend controller functions to match the changed user-related endpoint paths
2023-09-05 17:19:11 -03:00
Gabriel Luiz Freitas Almeida
5a6a052b2d ⬆️ chore(pyproject.toml): upgrade types-redis to version 4.6.0.5 for better compatibility and type checking 2023-09-05 15:35:30 -03:00
Gabriel Luiz Freitas Almeida
0d9d4856fb 🐛 fix(celery_app.py): ignore type error for Celery import to avoid linting issues
🐛 fix(base.py): ignore type error for AsyncResult import to avoid linting issues

🐛 fix(worker.py): ignore type error for SoftTimeLimitExceeded import to avoid linting issues
 feat(worker.py): add conditional clearing of session cache based on clear_cache flag to improve performance
2023-09-05 15:35:14 -03:00
Gabriel Luiz Freitas Almeida
44bd6e4787 🔥 refactor(process.py): remove unused clear_caches_if_needed function
🔀 refactor(process.py): refactor process_graph_cached function to use Result dataclass for return type and remove unused code
2023-09-05 15:34:56 -03:00
Gabriel Luiz Freitas Almeida
d13f0e77df 🔧 chore(utils.py): remove unused imports and classes
🔥 refactor(utils.py): remove unused Memoize class and its methods
2023-09-05 15:34:45 -03:00
Gabriel Luiz Freitas Almeida
ba9d57fa78 🔥 refactor(chat/manager.py): remove unused imports and code
🚀 feat(chat/manager.py): add import for pil_to_base64 function to support image encoding in chat messages
2023-09-05 15:34:35 -03:00
Gabriel Luiz Freitas Almeida
e74fc00442 🔧 chore(base.py): add Redis configuration options to base settings for better flexibility and customization 2023-09-05 15:34:20 -03:00
Gabriel Luiz Freitas Almeida
a6322461c0 🐛 fix(api_key/crud.py): fix variable name conflict in update_total_uses function to prevent overwriting the api_key parameter
🔒 chore(api_key/crud.py): add error handling to update_total_uses function to raise ValueError if API Key is not found
2023-09-05 15:34:08 -03:00
Gabriel Luiz Freitas Almeida
9721e9d6cf 🐛 fix(manager.py): add validation to check if task function has an apply method before calling it
 feat(manager.py): change return type of launch_task method to Any to allow for more flexibility in return values
2023-09-05 15:33:43 -03:00
Gabriel Luiz Freitas Almeida
779c021d78 🐛 fix(anyio.py): change return type annotation of result() method from 'any' to 'Any' for better type hinting
🐛 fix(anyio.py): change parameter type annotation of get_task() method from 'int' to 'str' to match the actual type of task_id
2023-09-05 15:33:31 -03:00
Gabriel Luiz Freitas Almeida
8a47fb75cb 🔨 refactor(base.py): remove unnecessary type hinting for task_id parameter in get_task method
🔨 refactor(base.py): remove unnecessary return type hinting for launch_task method
2023-09-05 15:33:11 -03:00
Gabriel Luiz Freitas Almeida
e50704a49f 🐛 fix(celery.py): fix type hinting error for AsyncResult import
🔒 chore(celery.py): add check for delay method existence in launch_task to prevent errors
🔒 chore(celery.py): change get_task return type hint to Any to match actual return type
2023-09-05 15:32:54 -03:00
Lucas Oliveira
7e0394a114 Merge branch 'dev' into feature/profilePage 2023-09-05 15:22:01 -03:00
Lucas Oliveira
b6c5fecae2 Fixed message not sending when closing db 2023-09-05 15:20:51 -03:00
Gabriel Luiz Freitas Almeida
18af716290 🐛 fix(chat.py): update variable name from in_memory_cache to cache_manager for better clarity and consistency 2023-09-05 14:54:03 -03:00
Gabriel Luiz Freitas Almeida
7a63b5635d 🔥 refactor(run.py): remove unused imports and commented out code in run.py
🔥 refactor(test_cache.py): remove unused imports and commented out code in test_cache.py
2023-09-05 14:53:38 -03:00
Gabriel Luiz Freitas Almeida
00290d0f9e 🔧 fix(test_endpoints.py): remove unused imports and refactor test_basic_chat_with_two_session_ids_and_names to use a loop for better readability and maintainability
 feat(test_endpoints.py): add test_basic_chat_with_two_session_ids_and_names to test the functionality of handling multiple session IDs and names in the chat endpoint
2023-09-05 14:49:20 -03:00
Gabriel Luiz Freitas Almeida
9615523a8d 🔧 refactor(manager.py): simplify update_session and clear_session methods by removing unnecessary data_graph parameter 2023-09-05 14:49:10 -03:00
Gabriel Luiz Freitas Almeida
5903378503 🐛 fix(process.py): remove unnecessary else statement to improve code readability and semantics
🐛 fix(process.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(worker.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(test_process.py): update session_manager.build_key() and session_manager.clear_session() method calls to match the new implementation
2023-09-05 14:46:55 -03:00
Lucas Oliveira
109b9a1172 Added error checking when file is not a JSON 2023-09-05 14:21:47 -03:00
Lucas Oliveira
2c99d2ce70 Implemented flow add when dropping json 2023-09-05 14:14:47 -03:00