Commit graph

6,039 commits

Author SHA1 Message Date
anovazzi1
f28aaed065 update crlf 2023-08-21 18:02:32 -03:00
igorrCarvalho
d7f0ab9ba3 Fix: Tweak section and tweaks inputs not working 2023-08-21 17:47:37 -03:00
Gabriel Luiz Freitas Almeida
e7f43297b1 🔀 chore(pre-release.yml): simplify if condition for the if_release job to improve readability 2023-08-21 17:11:10 -03:00
Gabriel Luiz Freitas Almeida
0a235ef8d5 🔀 refactor(manager.py): refactor service initialization in manager.py for better organization and readability
🔀 refactor(schema.py): add AUTH_MANAGER service type to the ServiceType enum for better organization and consistency
2023-08-21 16:58:22 -03:00
Gabriel Luiz Freitas Almeida
031ab7e4b7 📦 chore(factory.py): add AuthManagerFactory class to handle creation of AuthManager service
🐛 fix(service.py): add type hints and import for SettingsManager in AuthManager class
2023-08-21 16:58:09 -03:00
Gabriel Luiz Freitas Almeida
5d9e631ddf 🔨 refactor(factory.py): remove unused parameter 'settings_service' from create method in CacheManagerFactory class 2023-08-21 16:56:20 -03:00
Gabriel Luiz Freitas Almeida
712d57be53 🔄 refactor(factory.py): rename settings_service parameter to settings_manager for better clarity and consistency
🐛 fix(factory.py): update variable name in if condition from settings_service.settings.DATABASE_URL to settings_manager.settings.DATABASE_URL to fix incorrect variable reference
2023-08-21 16:56:07 -03:00
Gabriel Luiz Freitas Almeida
fa9ecd0039 🚀 feat(models/__init__.py): add User and Token models to __all__ list for better module importability 2023-08-21 16:55:45 -03:00
Gabriel Luiz Freitas Almeida
181620e538 🔧 fix(manager.py): import List from typing module to fix type hinting error
 feat(manager.py): add support for registering factories with dependencies to handle service creation
🔧 fix(manager.py): fix service creation logic to handle dependencies and create services in the correct order
 feat(manager.py): add support for initializing session manager with dependencies
2023-08-21 16:37:56 -03:00
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
anovazzi1
43ef297263 fixed import error on edges 2023-08-21 16:08:12 -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
53722f3f1d 🔧 chore(devcontainer.json): update devcontainer.json for Langflow Demo Container
🔧 chore(devcontainer.json): update devcontainer.json for Langflow Dev Container
2023-08-21 14:54:09 -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
Gabriel Luiz Freitas Almeida
6afaede719 feat(.gitignore): add .gitignore file to ignore Terraform related files and directories 2023-08-21 13:47:11 -03:00
Gabriel Luiz Freitas Almeida
f4760a38a3 🚀 feat(build-push.sh): add script to build and push Docker images
🚀 feat(build.sh): add script to build Docker images
2023-08-21 13:47:02 -03:00
Gabriel Luiz Freitas Almeida
15f6200477 🔧 chore(locustfile.py): remove hardcoded flow ID and replace it with the value from the FLOW_ID environment variable for flexibility and security 2023-08-21 13:46:35 -03:00
Gabriel Luiz Freitas Almeida
517a48f885 First implementation of terraform setup 2023-08-21 13:45:41 -03:00
Gabriel Luiz Freitas Almeida
d1ae69ca6e
fix mendable (#789) 2023-08-21 16:21:15 +00:00
Gabriel Luiz Freitas Almeida
fe65b63400 🔧 chore(deploy): update docker-compose version to 3.8 for better compatibility and features
🐳 chore(deploy): update traefik image version to v3.0 for improved functionality and compatibility
🔧 chore(deploy): remove unnecessary port mappings for backend, queue, pgadmin, redis, prometheus, and grafana services
2023-08-21 08:19:12 -03:00
Gabriel Luiz Freitas Almeida
d0911b3fd2 feat(.env.example): add example environment variables for domain, stack name, Traefik network, and Traefik tags to provide a template for configuring the deployment environment 2023-08-20 23:41:21 -03:00
Gabriel Luiz Freitas Almeida
6ffb994e53 📦 chore(docker-compose.override.yml): add docker-compose.override.yml file to configure Traefik proxy and services for local development
This commit adds a new file `docker-compose.override.yml` to the `deploy` directory. The file contains configuration for the Traefik proxy and services used for local development. The configuration includes:

- Enabling Docker in Traefik to read labels from Docker services
- Adding a constraint to only use services with a specific label for this stack
- Disabling the exposure of all Docker services by default
- Enabling the access log and Traefik log
- Enabling the Traefik Dashboard and API in insecure mode for local development

The file also includes configuration for the following services:

- `proxy`: Configured to listen on ports 80 and 8090, with labels for routing and load balancing
- `pgadmin`: Configured to listen on port 5050
- `flower`: Configured to listen on port 5555
- `backend`: Configured with labels for routing and load balancing on paths `/api/v1`, `/docs`, and `/health`
- `frontend`: Configured with labels for routing and load balancing on the root path

The `traefik-public` network is also defined for use by the Traefik proxy.

This file is intended to be used as an override for the main `docker-compose.yml` file during local development.

🐳 chore(docker-compose.yml): add Traefik reverse proxy configuration for services

🔧 fix(docker-compose.yml): fix path to startup-backend.sh script

🚀 feat(docker-compose.yml): add support for deploying backend, celery worker, flower, frontend, prometheus, and grafana services

🔧 fix(docker-compose.yml): fix volume configuration for db service

🔧 fix(docker-compose.yml): fix network configuration for pgadmin service

🔧 fix(docker-compose.yml): fix network configuration for traefik proxy service

🔧 fix(docker-compose.yml): fix network configuration for flower service

🔧 fix(docker-compose.yml): fix network configuration for frontend service

🔧 fix(docker-compose.yml): fix network configuration for prometheus service

🔧 fix(docker-compose.yml): fix network configuration for grafana service
2023-08-20 23:39:19 -03:00
Gabriel Luiz Freitas Almeida
9baf588e5e 🔥 refactor(nginx.conf): remove redundant code for proxying /api/v1/ and /health routes to backend service 2023-08-20 23:38:47 -03:00
Gabriel Luiz Freitas Almeida
bff329e278 🔧 chore(flower.env): add FLOWER_UNAUTHENTICATED_API=True to allow unauthenticated access to Flower API 2023-08-20 13:26:29 -03:00
Gabriel Luiz Freitas Almeida
2d85ae9dd4 🚀 feat(docker-compose.yml): upgrade docker-compose version to 3.3 for compatibility with newer features and syntax
🔧 chore(docker-compose.yml): update backend.env file path to remove leading './' for consistency

🔧 chore(docker-compose.yml): remove explicit port mapping for backend service to use the default port

🔧 chore(docker-compose.yml): add deploy configuration for celery worker service to ensure only one replica is deployed

🔧 chore(docker-compose.yml): add prometheus and grafana services with necessary configurations and dependencies

📝 docs(prometheus.yml): add prometheus configuration file with scrape targets for prometheus and flower services
2023-08-20 13:26:02 -03:00
Gabriel Luiz Freitas Almeida
afcd1f847c 🔧 chore(locustfile.py): update Locust test file to use FastHttpUser instead of HttpUser for improved performance
🔧 chore(locustfile.py): update host URL to remove unnecessary colon in the port number
🔧 chore(locustfile.py): refactor send_name_and_check task to use a more efficient polling mechanism for task status
🔧 chore(locustfile.py): update flow_id and session_id generation logic to use more meaningful values
🔧 chore(locustfile.py): refactor send_name_and_check task to use a separate process function for better code organization and readability
🔧 chore(locustfile.py): update payload2 to include a more descriptive text for the input
🔧 chore(locustfile.py): update assertion in send_name_and_check task to check if the name is present in the result2 response
2023-08-20 13:25:11 -03:00
Gabriel Luiz Freitas Almeida
3d84aace37 🔧 fix(endpoints.py): import missing dependencies to resolve NameError
 feat(endpoints.py): add new endpoint to get task status by task ID
🔧 fix(schemas.py): update ProcessResponse schema to use 'id' instead of 'session_id' for consistency
 feat(schemas.py): add new schema for TaskStatusResponse
2023-08-20 13:24:47 -03:00
DiogenesBR
5fd3da010e Atualização do ChromaComponent adicionando campos que havia na versão antiga 2023-08-18 21:10:03 +00:00
DiogenesBR
5e7681ea09 Add some new types to .gitattributes 2023-08-18 16:58:18 -03:00
Cristhian Zanforlin Lousa
b319b909e4 ️ chore(frontend): update moment package to version 2.29.4 for bug fixes and improvements 2023-08-18 15:01:10 -03:00
carlosrcoelho
59bfabd119 fix mendable 2023-08-18 12:59:58 -03:00
Gabriel Luiz Freitas Almeida
298e499f72 🚀 feat(base.Dockerfile): copy specific file 'main.py' from src/backend/langflow to improve build performance and reduce unnecessary copying
🐛 fix(base.Dockerfile): fix copying of src/backend directory to ensure all files are included in the build context
2023-08-18 10:09:45 -03:00
Gabriel Luiz Freitas Almeida
8bdde3bc05 🔨 refactor(custom_component.py): remove unused import and update function name for better code organization and clarity
📝 docs(custom_component.py): update docstring for better readability and understanding
🔧 chore(custom_component.py): add new file names.txt for locust tests with a list of names for load testing
2023-08-18 08:57:53 -03:00
Gabriel Luiz Freitas Almeida
7f217bd518 🔧 refactor(process.py): remove unused imports and variables, refactor function names for clarity
 feat(process.py): introduce SessionManager to handle loading and updating langchain_object sessions
🐛 fix(process.py): update cache with the updated langchain_object after processing graph
2023-08-18 08:57:38 -03:00
Gabriel Luiz Freitas Almeida
2183f167cd 🐛 fix(manager.py): add cache_manager.set() to store langchain_object in cache after successful initialization
🐛 fix(celeryconfig.py): fix condition to check if BROKER_URL and RESULT_BACKEND are present in os.environ before using them, fallback to langflow_redis_host and langflow_redis_port if not present
2023-08-18 08:57:24 -03:00
Gabriel Luiz Freitas Almeida
682e611947 🔧 fix(endpoints.py): remove unused import and function call to process_graph_cached
🔧 fix(worker.py): refactor process_graph_cached into process_graph_cached_task and update function signature and implementation to use SessionManager for loading and updating the graph
2023-08-18 08:57:12 -03:00
Gabriel Luiz Freitas Almeida
c195456c49 🔧 fix(base.py): update debug log message to provide more meaningful information about the number of vertices in the graph
🔧 fix(run.py): comment out the caching functionality for building sorted vertices to prevent caching issues
2023-08-18 08:56:58 -03:00
Gabriel Luiz Freitas Almeida
f4a0c9f436 🐛 fix(manager.py): remove commented code block to improve code readability and maintainability
 feat(manager.py): add initialization for session manager and its dependencies (cache manager and settings manager) to enable session management functionality
2023-08-18 08:52:26 -03:00
Gabriel Luiz Freitas Almeida
853648ae33 📝 chore(locustfile.py): add locustfile.py for load testing the API
🐛 fix(test_process.py): refactor test_load_langchain_object_with_cached_session to use session_manager
🐛 fix(test_process.py): refactor test_load_langchain_object_with_no_cached_session to use session_manager
🐛 fix(test_process.py): refactor test_load_langchain_object_without_session_id to use session_manager
2023-08-18 08:51:56 -03:00
Gabriel Luiz Freitas Almeida
a7ff7da778 🐛 fix(base.Dockerfile): remove unnecessary copy of ./src/backend directory to improve build performance
 feat(base.Dockerfile): add healthcheck for queue and celeryworker services to ensure their availability
 feat(docker-compose.yml): add healthcheck for queue, celeryworker, and flower services to ensure their availability
🐛 fix(docker-compose.yml): fix the path in the command for backend service startup
🐛 fix(flower.env): add missing double quote at the end of C_FORCE_ROOT value
🐛 fix(startup-backend.sh): remove unnecessary --reload flag from uvicorn command and add --workers -1 flag to utilize all available CPU cores
2023-08-18 08:51:30 -03:00
Gabriel Luiz Freitas Almeida
ad1d48c69c
🐛 fix(endpoints.py): add validation to ensure that custom components … (#788) 2023-08-18 02:32:47 +00:00
Gabriel Luiz Freitas Almeida
9baeeb02a6
Merge branch 'main' into release 2023-08-18 02:31:24 +00:00
Gabriel Luiz Freitas Almeida
ee52095f61 🔥 chore(package.json): remove devDependencies from package.json
🔖 chore(pyproject.toml): bump version to 0.4.12
2023-08-17 23:30:15 -03:00
Gabriel Luiz Freitas Almeida
d1c17cffe6
🐛 fix(endpoints.py): add validation to ensure that custom components are in a single category (#787) 2023-08-18 02:13:59 +00:00