Commit graph

3,768 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
f49a54879d 🔧 chore(auth.py): refactor get_secret_key method for improved readability and maintainability
🔒 chore(auth.py): update logging level to debug for CONFIG_DIR not provided case in get_secret_key method
2023-09-26 15:35:45 -03:00
Gabriel Luiz Freitas Almeida
553bf51a7f fix formatting 2023-09-26 15:24:49 -03:00
Gabriel Luiz Freitas Almeida
7ff3ce619e 🔧 refactor(__main__.py): reorganize imports and remove unused imports to improve code readability and maintainability
🔧 refactor(__main__.py): reorganize imports and remove unused imports to improve code readability and maintainability
2023-09-26 15:23:37 -03:00
Gabriel Luiz Freitas Almeida
8e42cc2035 🔀 refactor(__main__.py): rename functions and imports to improve code readability and maintainability 2023-09-26 15:21:05 -03:00
Gabriel Luiz Freitas Almeida
d05e085c4c 🐛 fix(auth.py): change refresh token expiration time from 70 minutes to 12 hours for better security and usability
 feat(auth.py): add logging statements to provide more visibility into secret key generation and saving process
🐛 fix(auth.py): handle IOError when reading or writing secret key to prevent unexpected failures
2023-09-26 15:14:20 -03:00
Cristhian Zanforlin Lousa
536e9d8f47 merge fix 2023-09-26 12:08:19 -03:00
Cristhian Zanforlin Lousa
df3ce5a3d8 🐛 fix(parameterComponent): add support for 'int' type in conditional rendering to display a component
 feat(parameterComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(codeTabsComponent): import missing functions from reactflowUtils to fix build error
 feat(codeTabsComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
 feat(codeTabsComponent): add DictComponent and KeypairListComponent to handle 'dict' and 'NestedDict' types
🐛 fix(ApiModal): import missing function from reactflowUtils to fix build error
 feat(ApiModal): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(types): add Object type to buildTweakObject function in codeTabsPropsType
🐛 fix(reactflowUtils): add missing convertArrayToObj function to convert array of objects to object
 feat(reactflowUtils): add convertArrayToObj function to convert array of objects to object

🐛 fix(utils.ts): fix indentation and formatting issues in groupByFamily function
🐛 fix(utils.ts): fix indentation and formatting issues in buildTweakObject function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonApiCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getCurlCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getChatComponentCode function
2023-09-26 12:07:31 -03:00
Gabriel Luiz Freitas Almeida
8deeeb5ba3 🐛 fix(utils.ts): change parameter name from apiKey to api_key to improve consistency and readability
 feat(utils.ts): add support for x-api-key header in run_flow function to pass the API key as a header instead of a query parameter
🔧 chore(utils.ts): update getCurlCode function to use x-api-key header instead of api-key header for authentication
2023-09-26 11:45:12 -03:00
Gabriel Luiz Freitas Almeida
734ab6b983
chore: remove lc-serve (#963) 2023-09-26 11:24:58 -03:00
Gabriel Luiz Freitas Almeida
4a3dae5ed6 Merge remote-tracking branch 'origin/dev' into remove-jcloud 2023-09-26 11:24:15 -03:00
Cristhian Zanforlin Lousa
0e6b38c427 🔥 refactor(dictAreaModal/index.tsx): remove unnecessary console.log statement
The console.log statement was not providing any useful information and was removed to improve code cleanliness and performance.
2023-09-26 11:21:49 -03:00
Cristhian Zanforlin Lousa
f56dcc03b0 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-09-26 11:21:38 -03:00
Cristhian Zanforlin Lousa
6803cd1d8c 🐛 fix(dictComponent): fix useEffect dependency to onChange instead of value to prevent unnecessary re-rendering
🐛 fix(keypairListComponent): add rows prop to Textarea components to fix rendering issue

🐛 fix(EditNodeModal): remove unused state variables and fix rendering issue with dict and NestedDict types

🐛 fix(dictAreaModal): fix useEffect dependency to dictObj instead of value to prevent unnecessary re-rendering
2023-09-26 11:21:30 -03:00
Gabriel Luiz Freitas Almeida
12a5dd8fde 🐛 fix(utils.py): handle cases where file.filename is not a string or Path object to prevent errors
🔧 chore(utils.py): refactor save_uploaded_file function to improve code readability and maintainability
2023-09-26 11:13:48 -03:00
anovazzi1
41d18edc97 update package lock json 2023-09-26 10:46:55 -03:00
anovazzi1
b833d45fd1
Adds async processing, session management and a starter cloud setup (#921)
This PR adds the ability to use Redis as cache, Celery for task
execution, Session management, async tasks for the API and some other
improvements.

Run the following command after setting up the .env file in `./deploy`
folder:
```bash
docker compose up --exit-code-from tests tests result_backend broker celeryworker db --build
```
2023-09-26 10:34:38 -03:00
Cristhian Zanforlin Lousa
cc9f834178 🐛 fix(authContext.tsx): update cookie names for access token and refresh token to improve clarity and consistency
🐛 fix(api.tsx): update cookie names for access token and refresh token to match changes in authContext.tsx
2023-09-26 10:21:04 -03:00
Cristhian Zanforlin Lousa
5c57e62f55 🔄 refactor(keypairListComponent): replace Input component with Textarea component for key and value inputs
🐛 fix(keypairListComponent): fix incorrect prop name in Textarea component for value input
2023-09-26 08:19:31 -03:00
Gabriel Luiz Freitas Almeida
12a46b6936 🐛 fix(login.py): re-raise HTTPException if it is already raised to prevent overriding the original exception 2023-09-25 22:09:46 -03:00
Gabriel Luiz Freitas Almeida
c6882a0598 🐛 fix(login.py): move user authentication logic outside of try-except block to ensure proper error handling
 feat(login.py): add endpoint for auto login to improve user experience
2023-09-25 20:56:39 -03:00
Gabriel Luiz Freitas Almeida
62a4e94c71 🔧 fix(api_key.py): remove unnecessary sa_relationship_kwargs to improve code readability and maintainability
🔧 fix(user.py): add sa_relationship_kwargs to api_keys relationship to enable cascading delete when deleting a user
2023-09-25 19:58:21 -03:00
Gabriel Luiz Freitas Almeida
1e0f81c135 🐛 fix(login.py): handle exceptions in login_to_get_access_token function to provide more detailed error messages
🐛 fix(users.py): only hash password if user is a superuser to prevent regular users from changing their password
2023-09-25 19:34:17 -03:00
Gabriel Luiz Freitas Almeida
4be21db30c 🔧 chore(user.py): add optional 'username' field to UserUpdate model for better flexibility in updating user information 2023-09-25 19:14:09 -03:00
Gabriel Luiz Freitas Almeida
3a4ae5e37b 🐛 fix(users.py): prevent non-superusers from changing their password 2023-09-25 19:12:57 -03:00
Gabriel Luiz Freitas Almeida
de4262faa6 🐛 fix(endpoints.py): fix argument passed to save_uploaded_file function to correctly save the uploaded file
🐛 fix(utils.py): fix argument type in save_uploaded_file function to correctly handle UploadFile object
2023-09-25 18:59:21 -03:00
anovazzi1
c3df875f1a fix(AdminPage/index.tsx): fix off-by-one error in getUsersPage function call to correctly pass the index parameter
The getUsersPage function was being called with the incorrect index parameter. It was off by one, causing the wrong page of users to be fetched. This has been fixed by subtracting 1 from the index parameter before calling the function.
2023-09-25 18:09:14 -03:00
Gabriel Luiz Freitas Almeida
f497369a1c 🔧 chore(users.py): remove unused current_user variable in read_all_users function
🔧 chore(api_key.py): add cascade delete to user-api_key relationship to ensure API keys are deleted when user is deleted
2023-09-25 18:06:52 -03:00
Gabriel Luiz Freitas Almeida
2a3ba95af9 🐛 fix(users.py): update reference to settings.NEW_USER_IS_ACTIVE to settings.auth_settings.NEW_USER_IS_ACTIVE to fix incorrect attribute access 2023-09-25 16:10:29 -03:00
Gabriel Luiz Freitas Almeida
a5da416bc4 🔧 fix(users.py): add support for NEW_USER_IS_ACTIVE setting to determine if new users should be active by default
🔧 fix(cache/manager.py): add warning log message to inform users that RedisCache is experimental and may not work as expected
🔧 fix(settings/auth.py): add NEW_USER_IS_ACTIVE setting to determine if new users should be active by default
2023-09-25 15:54:55 -03:00
Deepankar Mahapatro
9d39946629 chore: remove lc-serve 2023-09-25 15:48:14 +05:30
Gabriel Luiz Freitas Almeida
d8ba8f0746 🚀 feat(endpoints.py): add warning message for experimental feature to inform users about potential issues and encourage reporting 2023-09-24 00:09:53 -03:00
Gabriel Luiz Freitas Almeida
a75e80b0f7 🔧 refactor(endpoints.py): remove unused import of get_cache_service to improve code cleanliness and maintainability
🔧 refactor(schemas.py): make the backend field in ProcessResponse schema optional to handle cases where backend is not provided
🔧 refactor(utils.py): add type hint ignore comment to import statement for Celery to avoid type checking error
2023-09-23 23:30:45 -03:00
Gabriel Luiz Freitas Almeida
c5a6003ef5 🔧 fix(manager.py): replace logging module with loguru logger for consistent logging across the project
 feat(manager.py): add debug logs to check Celery availability and backend being used
🔧 fix(manager.py): move check_celery_availability function definition above its usage to improve code readability
 feat(manager.py): add debug logs to show task launch details and backend being used
2023-09-23 23:29:20 -03:00
Gabriel Luiz Freitas Almeida
5f3c602b29 🔥 chore(users.py): remove unused test endpoint for adding a superuser
The `add_super_user_for_testing_purposes_delete_me_before_merge_into_dev` endpoint was added for testing purposes and is no longer needed. It has been removed to clean up the codebase.
2023-09-23 23:29:10 -03:00
Gabriel Luiz Freitas Almeida
8760cf7f9a 🔧 fix(endpoints.py): import missing dependencies to improve code readability and maintainability
🔧 fix(endpoints.py): generate session ID if it is None to ensure a valid session ID is used
🔧 fix(endpoints.py): add backend information to the ProcessResponse to provide additional context
🔧 fix(schemas.py): add backend field to the ProcessResponse schema to match the changes in the endpoints.py file
2023-09-23 23:28:56 -03:00
Gabriel Luiz Freitas Almeida
befe79775b 🐛 fix(celery_app.py): add return type annotation to make_celery function to improve code readability and maintainability
🔧 chore(celeryconfig.py): update broker_url default value to use RabbitMQ instead of Redis for better performance and scalability
2023-09-23 23:28:37 -03:00
Gabriel Luiz Freitas Almeida
8c7df5e2f7 🐛 fix(utils.py): change get_celery_worker_status function to use app.control.ping() instead of i.ping() for better readability and consistency
🐛 fix(conftest.py): update LANGFLOW_REDIS_HOST and BROKER_URL environment variables to use "result_backend" instead of "queue" for better clarity and accuracy
2023-09-23 23:28:18 -03:00
Gabriel Luiz Freitas Almeida
8bbf25ee14 🐛 fix(frontend): update format script in package.json to include all files in subdirectories for consistent code formatting 2023-09-22 18:16:57 -03:00
Gabriel Luiz Freitas Almeida
200f5d647c fix more linting issues 2023-09-22 18:15:23 -03:00
Gabriel Luiz Freitas Almeida
99a4f01865 fix linting issues 2023-09-22 18:15:12 -03:00
Gabriel Luiz Freitas Almeida
479a808634 🔧 fix(endpoints.py): remove unused import and function call to improve code cleanliness and maintainability
🔧 fix(endpoints.py): move import statement to the top of the file for better organization and readability
🔧 fix(getters.py): change service type from DATABASE_MANAGER to DATABASE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from CACHE_MANAGER to CACHE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from SESSION_MANAGER to SESSION_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from TASK_MANAGER to TASK_SERVICE for consistency and clarity
🔧 fix(getters.py): remove unused function get_chat_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_settings_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_db_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_session() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function setup_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_services() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_settings_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_session_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_services() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function get_session_override() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function distributed_client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function test_user() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function active_user

🐛 fix(test_endpoints.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_login.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_setup_superuser.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_user.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
2023-09-22 18:07:55 -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
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