Commit graph

4,358 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
b309d8be0e 🔒 chore(auth.py): import necessary modules and add password context and OAuth2 password bearer scheme for authentication
🔒 chore(auth.py): add password context using bcrypt scheme and OAuth2 password bearer scheme for authentication
2023-08-21 16:34:23 -03:00
Gabriel Luiz Freitas Almeida
244a967517 🔨 refactor(service.py): remove unused imports and unused functions in the AuthManager class
🔧 chore(service.py): refactor the AuthManager class to accept a settings_manager parameter in the constructor for better dependency injection
🔧 chore(service.py): refactor the run_oauth2_scheme method in the AuthManager class to use the oauth2_scheme from the settings_manager instead of a hardcoded value

 feat(auth/utils.py): add authentication and authorization utilities for user authentication and token generation
🔒 chore(auth/utils.py): add auth_scheme_dependency function to handle authentication scheme dependency
🔒 chore(auth/utils.py): add get_current_user function to retrieve the current authenticated user
🔒 chore(auth/utils.py): add get_current_active_user function to retrieve the current active authenticated user
🔒 chore(auth/utils.py): add verify_password function to verify the password
🔒 chore(auth/utils.py): add get_password_hash function to get the hashed password
🔒 chore(auth/utils.py): add create_token function to create a JWT token
🔒 chore(auth/utils.py): add create_super_user function to create a super user
🔒 chore(auth/utils.py): add create_user_longterm_token function to create a long-term token for a user
🔒 chore(auth/utils.py): add create_user_api_key function to create an API key for a user
🔒 chore(auth/utils.py): add get_user_id_from_token function to get the user ID from a token
🔒 chore(auth/utils.py): add create_user_tokens function to create access and refresh tokens for a user
🔒 chore(auth/utils.py): add create_refresh_token function to create new access and refresh tokens using a refresh token
🔒 chore(auth/utils.py): add authenticate_user function to authenticate a user with username and password
2023-08-21 16:33:56 -03:00
Gabriel Luiz Freitas Almeida
e6bd9a07d5 🔧 fix(auth.py): update import statements for User model and related functions to match new file structure
🔧 fix(auth.py): update import statements for settings_manager and related settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
🔧 fix(auth.py): update references to settings_manager.settings to settings_manager.auth_settings to match new file structure
2023-08-21 16:33:27 -03:00
Gabriel Luiz Freitas Almeida
a84b5a119b Merge remote-tracking branch 'origin/dev' into authentication 2023-08-21 16:32:28 -03:00
Gabriel Luiz Freitas Almeida
f4d12f27e6 Adds new AuthSettings 2023-08-21 16:12:49 -03:00
Gabriel Luiz Freitas Almeida
3d5cf84095 📦 feat(models): add Token model to represent access and refresh tokens
📦 feat(models): add User model to represent user data

📦 feat(models): add UserAddModel, UserListModel, UserPatchModel, and UsersResponse models for user CRUD operations

📦 feat(models): add get_user_by_username and get_user_by_id functions to retrieve user data from the database

📦 feat(models): add update_user function to update user data in the database

📦 feat(models): add update_user_last_login_at function to update the last login timestamp of a user
2023-08-21 15:59:51 -03:00
Gabriel Luiz Freitas Almeida
4d3b12aff8 📝 chore(tasks.json): add tasks.json file to configure build tasks for the project
The tasks.json file is added to configure build tasks for the project. It includes tasks for initializing the project, building the backend and frontend, running tests, linting, formatting, and installing dependencies.
2023-08-21 15:09:36 -03:00
Gabriel Luiz Freitas Almeida
0679fb8754 🔧 chore(devcontainer.json): update postCreateCommand to install frontend and backend dependencies after container creation for easier development setup 2023-08-21 14:53:37 -03:00
Gabriel Luiz Freitas Almeida
20cf3e0346 🔧 chore(devcontainer.json): update devcontainer.json for Langflow Demo Container
🔧 chore(devcontainer.json): update devcontainer.json for Langflow Dev Container
2023-08-21 14:31:12 -03:00
gustavoschaedler
463831e8df Merge remote-tracking branch 'origin/dev' into authentication 2023-08-17 19:50:27 +01:00
anovazzi1
2078778976
update make frontendc (#783)
chore(Makefile): update 'install_frontendc' target to remove existing
node_modules and package-lock.json before running 'npm install' to
ensure a clean installation
2023-08-17 15:39:35 -03:00
anovazzi1
e362dc0bed Merge remote-tracking branch 'origin/dev' into fixmakeFrontendC 2023-08-17 15:37:21 -03:00
gustavoschaedler
3c4db074e4 🔧 fix(base.py): update BASE_COMPONENTS_PATH to point to the correct directory
🔧 fix(base.py): improve readability by removing commented out code and adding line breaks
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and indentation
🔧 fix(base.py): improve readability by adding line breaks and
2023-08-17 19:30:46 +01:00
anovazzi1
ab81c604a1 chore(Makefile): update 'install_frontendc' target to remove existing node_modules and package-lock.json before running 'npm install' to ensure a clean installation 2023-08-17 15:30:24 -03:00
Diógenes Betat Roos
50112c51d3
Update Devcontainer (#781)
Update Devcontainer to install and configure the development
environment.

- Add "setup_devcontainer" task to the makefile
- Add .gitattributes
2023-08-17 12:54:47 -03:00
Diógenes Betat Roos
6bb7fef28a Add .gitattributes 2023-08-17 14:59:20 +00:00
Diógenes Betat Roos
7907912af0 Correct the NewLine character 2023-08-17 14:51:54 +00:00
Diógenes Betat Roos
abe004eb6a Add Github Pull Request Extension 2023-08-17 14:12:12 +00:00
Diógenes Betat Roos
5cba006a54 Update in the devcontainer 2023-08-17 14:07:20 +00:00
Gabriel Luiz Freitas Almeida
1b94fc9d92 🐛 fix(endpoints.py): fix duplicate loading of custom components from the same path
 feat(endpoints.py): improve performance by skipping duplicate loading of custom components from the same path
2023-08-17 10:26:17 -03:00
Lucas Oliveira
500fc98a00 Merge branch 'main' into dev 2023-08-17 10:13:38 -03:00
Gabriel Luiz Freitas Almeida
c1511d7773
Add poetry to devcontainer (#780) 2023-08-17 11:55:19 +00:00
Gabriel Luiz Freitas Almeida
e210fc316a 🐛 fix(__main__.py): import and call initialize_settings_manager() to ensure settings manager is initialized
 feat(manager.py): add check to prevent duplicate registration of service factories in ServiceManager class
 feat(manager.py): add initialize_settings_manager() function to initialize the settings manager
2023-08-17 08:23:50 -03:00
hsm207
72042b315f add poetry to devcontainer 2023-08-17 11:02:42 +00:00
Gabriel Luiz Freitas Almeida
489075da17
Add_session_id (#779) 2023-08-17 00:45:43 +00:00
Gabriel Luiz Freitas Almeida
2f95e13026 ⬆️ chore(pyproject.toml): update types-python-jose and types-passlib versions to their latest versions for compatibility and bug fixes 2023-08-16 21:44:09 -03:00
Gabriel Luiz Freitas Almeida
87958c255e 🐛 fix(endpoints.py): change type annotation of session_id parameter in process_flow function to Union[None, str] to allow for None value
🐛 fix(schemas.py): change type annotation of session_id field in ProcessResponse schema to Optional[str] to allow for None value
🐛 fix(run.py): change return type annotation of build_sorted_vertices_with_caching function to Tuple[Any, Dict] to specify the return types
🐛 fix(process.py): change return type annotation of load_langchain_object function to Tuple[Union[Chain, VectorStore], Dict[str, Any], str] to include the session_id value in the return tuple
2023-08-16 21:43:35 -03:00
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
aa44125953
v0.4.11 (#777)
**Bug Fix**:
This PR resolves a critical bug causing the deletion of custom component
edges during saves. The issue stemmed from miscommunication between edge
tracking and saving logic.

**Enhancement**:
Additionally, this PR enhances user experience by introducing a loading
screen during app startup. The loading screen offers visual feedback for
app initialization.
2023-08-16 17:32:38 -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
gustavoschaedler
98a24d331c 🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key
2023-08-16 21:00:39 +01:00
gustavoschaedler
4eeb9449cb 🔧 fix(main.py): reformat import statements to improve readability and maintainability
 feat(main.py): add support for API key routes to enable API key management functionality
📝 docs(api_key.py): add API key routes for retrieving, creating, and deleting API keys
2023-08-16 20:20:18 +01:00
anovazzi1
2be7a88687
Release conflicts (#778)
update poetry lock and fix some conflicts
2023-08-16 15:52:58 -03:00
anovazzi1
83ad6b6986 chore(pyproject.toml): update package version from 0.4.10 to 0.4.11 to reflect changes in the codebase 2023-08-16 15:47:20 -03:00