Commit graph

4,258 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
8ff739a288 🚀 feat(test_process.py): add tests for loading langchain object with and without cached session
🐛 fix(test_process.py): import missing functions and modules to fix test failures
2023-08-16 21:30:07 -03:00
Gabriel Luiz Freitas Almeida
199ea3b1b8 🔧 fix(process.py): refactor process_graph_cached function for better readability and maintainability
 feat(process.py): add clear_caches_if_needed function to clear cache if clear_cache flag is set
 feat(process.py): add load_langchain_object function to load langchain_object and artifacts from data_graph
 feat(process.py): add process_inputs function to process inputs and add artifacts to inputs
 feat(process.py): add generate_result function to generate result and thought based on langchain_object and inputs
2023-08-16 21:29:17 -03:00
Gabriel Luiz Freitas Almeida
2f928c7d84 Merge remote-tracking branch 'origin/dev' into add_session_id 2023-08-16 19:31:29 -03:00
Gabriel Luiz Freitas Almeida
479db46fcf
Changes default database_url to a cache folder (#771) 2023-08-16 22:22:53 +00:00
Gabriel Luiz Freitas Almeida
7539ba3166 Merge remote-tracking branch 'origin/dev' into fix_db_location 2023-08-16 19:21:47 -03:00
anovazzi1
2a4668d90d
Types refactor (#659)
This pull request aims to perform a comprehensive type refactor across
the project, enhancing type safety and improving code clarity. The
changes introduced in this PR will lead to better maintainability,
reduced bugs related to type-related issues, and increased overall code
quality.
2023-08-16 18:39:05 -03:00
anovazzi1
7c4fbffeb1 Merge remote-tracking branch 'origin/dev' into types_refactor 2023-08-16 18:33:39 -03:00
anovazzi1
4b64d38d68 fix(inputComponent): fix TypeScript error by adding non-null assertion to className variable
fix(authContext): fix TypeScript error by setting initial value of userData to null
fix(tsconfig.json): enable strict mode in TypeScript compiler for better type checking and error detection
2023-08-16 18:29:47 -03:00
anovazzi1
46aa816ba9 run npm install 2023-08-16 18:22:42 -03:00
anovazzi1
e33e236466 Merge branch 'login' into types_refactor 2023-08-16 18:19:36 -03:00
anovazzi1
545a099339 removed strict and implicity any from tsconfig 2023-08-16 18:13:53 -03:00
anovazzi1
c5850977a7 fix(utils.ts): add TemplateVariableType import to fix type error in checkBaseClass function
chore(tsconfig.json): set strict to false and noImplicitAny to true to relax strict type checking and enforce explicit typing
2023-08-16 18:00:37 -03:00
anovazzi1
57f580c93d refactor(utils.ts): simplify logic for getting chat input field
The logic for getting the chat input field has been simplified by removing unnecessary checks and using optional chaining. This improves readability and reduces the complexity of the code.
2023-08-16 17:52:08 -03:00
anovazzi1
af218867eb fix(formModal): fix nullish coalescing operator usage to handle nullable properties in tabsStateFlowId.formKeysData 2023-08-16 17:49:03 -03:00
anovazzi1
9b0ff166c9 fix(ApiModal): fix null assertion on tabs array
fix(ApiModal): fix strict mode in tsconfig.json to enable strict type checking
2023-08-16 17:45:12 -03:00
anovazzi1
826c62c6fc
update make file to prevent binding bug on make frontend (#694)
This pull request addresses a critical issue related to a binding bug
that has been affecting the make_frontend command. The existing Makefile
was susceptible to this bug, causing unexpected behaviors and
disruptions during the build process.
2023-08-16 17:40:35 -03:00
anovazzi1
16fa3a66b8 chore(Makefile): simplify install_frontend target by removing unnecessary conditional statement
feat(Makefile): add install_frontendc target to install frontend dependencies using npm ci for clean installs
feat(Makefile): add frontendc target to install frontend dependencies using npm ci and run frontend
chore(ApiModal/index.tsx): reformat codesArray for better readability
2023-08-16 17:28:35 -03:00
anovazzi1
9096fcd110 chore(Makefile): modify install_frontend target to conditionally run npm ci or npm install based on the value of the clean variable 2023-08-16 17:23:24 -03:00
anovazzi1
aae6223593 code format 2023-08-15 19:43:43 -03:00
anovazzi1
ec79cc43bd Merge remote-tracking branch 'origin/dev' into types_refactor 2023-08-15 19:34:53 -03:00
Gabriel Luiz Freitas Almeida
5e715af875 🔧 fix(ApiModal/index.tsx): fix formatting of codesArray to improve readability
🔧 fix(formModal/index.tsx): fix formatting of getWebSocketUrl function to improve readability
🔧 fix(vite.config.ts): fix formatting of comment to improve readability
2023-08-15 16:46:53 -03:00
Gabriel Luiz Freitas Almeida
69d03f64b1 🔧 fix(base.py): remove redundant imports and nested class declaration
 feat(base.py): add validation logic to set the DATABASE_URL value based on environment variables and file paths
2023-08-15 16:37:21 -03:00
Gabriel Luiz Freitas Almeida
6e3a6ce8c3 🐛 fix(base.py): set CONFIG_DIR to default value if not provided to improve functionality
 feat(base.py): add support for setting CONFIG_DIR to a cache directory if not provided to improve file management
🐛 fix(base.py): set DATABASE_URL to default value if not provided to improve functionality
 feat(base.py): add support for setting DATABASE_URL to LANGFLOW_DATABASE_URL environment variable if not provided to improve configurability
🐛 fix(base.py): raise ValueError if CONFIG_DIR is not set when using sqlite database to improve error handling
 feat(base.py): add support for copying existing sqlite database to new location if CONFIG_DIR is set to improve migration process
2023-08-15 16:33:47 -03:00
anovazzi1
8f82367300 refactor(modals/UserManagementModal): move import statement for InputComponent to the top for better organization and readability
refactor(pages/loginPage): remove unused import statement for IconComponent

refactor(pages/signUpPage): remove unused import statement for IconComponent

refactor(routes.tsx): remove unused import statement for SignUp page
2023-08-15 16:05:08 -03:00
anovazzi1
015064b453 Merge branch 'authentication' into login 2023-08-15 16:03:42 -03:00
anovazzi1
4a7ccda51c Merge branch 'login' of personal:logspace-ai/langflow into login 2023-08-15 16:01:08 -03:00
gustavoschaedler
695a337c6c 🔧 fix(auth.py): move SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, and REFRESH_TOKEN_EXPIRE_MINUTES to environment variables for better security and configurability
 feat(auth.py): add support for loading settings from environment variables in create_token and create_user_tokens functions
🔧 fix(auth.py): use settings_manager to access SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, and REFRESH_TOKEN_EXPIRE_MINUTES in create_token and create_user_tokens functions
🔧 fix(auth.py): use settings_manager to access SECRET_KEY and ALGORITHM in get_current_user function
 feat(auth.py): add create_user_longterm_token function to create long-term access token for auto login
 feat(login.py): add auto_login endpoint to automatically log in as a super user if AUTO_LOGIN is enabled in the settings
🔧 fix(settings/base.py): add SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, REFRESH_TOKEN_EXPIRE_MINUTES, and AUTO_LOGIN settings to the base settings class
 feat(settings/base.py): add AUTO_LOGIN setting to control whether auto login is enabled or not
🔧 fix(settings/base.py): use secrets.token_hex(32) to generate a random SECRET_KEY instead of hardcoding it
🔧 fix(settings/base.py): update comments and formatting in the base settings class
 feat(settings/base.py): add AUTO_LOGIN setting to control whether auto login is enabled or not
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings

🔥 refactor(settings.py): remove unused imports and code, clean up formatting and comments
🔀 chore(settings.py): merge duplicated code into reusable functions
📝 docs(settings.py): add missing docstrings and comments for better code documentation
🔧 chore(settings.py): update settings file to improve readability and maintainability
2023-08-15 20:00:02 +01:00
anovazzi1
a7ed611a15 Merge branch 'dev' into updateMakefile 2023-08-15 15:59:57 -03:00
anovazzi1
021380b6f3 format code 2023-08-15 15:40:50 -03:00
anovazzi1
b528ae86fd chore(Makefile): change npm install command to npm ci for frontend installation to ensure reproducible builds 2023-08-15 15:39:33 -03:00
anovazzi1
993cea0c0b Merge branch 'dev' into updateMakefile 2023-08-15 15:01:45 -03:00
gustavoschaedler
c752872fc3 🐛 fix(auth.py): add optional parameter 'update_last_login' to 'create_user_tokens' function to allow updating last login only when needed
🐛 fix(auth.py): add optional parameter 'db' to 'create_refresh_token' function to allow passing the database session
 feat(login.py): pass 'update_last_login=True' to 'create_user_tokens' function to update last login when user successfully logs in
🐛 fix(ApiModal/index.tsx): fix formatting of 'codesArray' array to improve readability
🐛 fix(formModal/index.tsx): fix formatting of 'getWebSocketUrl' function to improve readability
🐛 fix(vite.config.ts): fix typo in comment
2023-08-15 16:50:40 +01:00
gustavoschaedler
ab61edfbf9 Merge remote-tracking branch 'origin/dev' into authentication 2023-08-14 22:52:57 +01:00
gustavoschaedler
e9a94d7374 🐛 fix(auth.py): remove unnecessary blank line
🐛 fix(auth.py): add validation for inactive users and users waiting for approval in authenticate_user function
 feat(login.py): remove unnecessary blank line
2023-08-14 22:46:55 +01:00
igorrCarvalho
cb66255b84 Refactor: Refactor api modal constant 2023-08-14 18:17:12 -03:00
gustavoschaedler
501d7399a8 🔒 chore(auth.py): add support for retrieving current user and current active user
🔒 chore(auth.py): add support for creating user tokens with user id

🔒 chore(auth.py): add support for updating last_login_at when creating user tokens

🔒 chore(auth.py): add support for updating user information

🔒 chore(login.py): add support for retrieving current active user in login route

🐛 fix(users.py): fix import order and remove unused imports to improve code readability
 feat(users.py): add support for pagination in read_all_users endpoint to retrieve a list of users with pagination
🔧 refactor(users.py): rename update_user function to patch_user for better semantics and consistency
🔧 refactor(users.py): refactor update_user function to use update_user function from models module for better code organization and reusability
 feat(users.py): add support for creating a superuser for testing purposes in add_super_user_for_testing_purposes_delete_me_before_merge_into_dev endpoint
2023-08-14 21:18:47 +01:00
igorrCarvalho
e705f5bdf4 Refactor[UserManagementModal]: Refactor admin user sign to use password input component 2023-08-14 12:38:59 -03:00
igorrCarvalho
019e34190a Refactor: Remove Link in signup button 2023-08-14 12:27:50 -03:00
igorrCarvalho
610e168dbc Refactor[routes.tsx]: Remove sign up page while user cant sign up to langflow 2023-08-14 12:18:48 -03:00
Gabriel Luiz Freitas Almeida
5e47d0ff14
adding ChatVertexAI LLM component back into the config.yaml (#724) 2023-08-14 15:10:26 +00:00
Gabriel Luiz Freitas Almeida
5089480bc0
Update pyproject.toml (#754) 2023-08-14 15:07:57 +00:00
igorrCarvalho
185327fd6b refactor: Remove unnused OAuth2 2023-08-11 16:36:28 -03:00
igorrCarvalho
3e83540eab refactor: Add adjusts to make confirm password error work 2023-08-11 16:21:01 -03:00
gustavoschaedler
f1b2fea20f Merge remote-tracking branch 'origin/dev' into authentication 2023-08-11 19:40:11 +01:00
Lucas Oliveira
0f015cadc7 Fixed password required not showing 2023-08-11 15:25:24 -03:00
Cristhian Zanforlin Lousa
c30cb3e002 Merge branch 'authentication' into login 2023-08-11 08:22:37 -03:00
gustavoschaedler
580b439b80 🔧 chore(users.py): refactor and improve code readability in users.py
 feat(users.py): add docstrings to API endpoints for better documentation
🔥 chore(users.py): remove unnecessary code and comments
🐛 fix(users.py): fix return type hints in API endpoints
2023-08-11 03:52:02 +01:00
gustavoschaedler
0a5026a6ed 🔧 fix(auth.py): change refresh token expiration time from 180 minutes to 70 minutes for better security
🔧 fix(auth.py): change SECRET_KEY comment from "TODO" to "JUST FOR TEST" for clarity
🔧 fix(auth.py): change create_access_token function name to create_token for consistency
🔧 fix(auth.py): change create_refresh_token function to accept refresh_token parameter instead of data dictionary
🔧 fix(auth.py): change create_refresh_token function to decode and validate refresh_token before creating new user tokens
🔧 fix(auth.py): change authenticate_user function to use get_user_by_username instead of get_user
🔧 fix(auth.py): change get_current_user function to use get_user_by_username instead of get_user
🔧 fix(auth.py): change get_user function name to get_user_by_username for clarity
🔧 fix(users.py): change get_password_hash function to be inside the router scope for better encapsulation
🔧 fix(users.py): change add_user function to return UserListModel instead of User
🔧 fix(users.py): change update_user function to update user data based on UserPatchModel fields
🔧 fix(users.py): change update_user function to handle username conflicts and update user's updated_at field
🔧 fix(users.py): change delete_user function to delete user based on user_id
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh
2023-08-11 03:13:08 +01:00
Melroy van den Berg
7347466563
Update pyproject.toml
Update fake-useragent to latest version (1.2.1). Disclaimer: I'm the maintainer.
2023-08-11 01:07:33 +02:00
Cristhian Zanforlin Lousa
b6794c76fd Merge branch 'authentication' into login 2023-08-10 15:27:33 -03:00