Commit graph

11,619 commits

Author SHA1 Message Date
igorrCarvalho
bfc8ad8e30 feat: Add uploadFlow function to import from JSON button 2023-08-30 14:20:10 -03:00
Gabriel Luiz Freitas Almeida
2deebad950 📦 chore(pyproject.toml): add markupsafe dependency to improve compatibility and security
🔒 chore(pyproject.toml): update black dependency to version 23.1.0 for development purposes
2023-08-30 11:57:19 -03:00
Cristhian Zanforlin Lousa
4c228303c9 🐛 fix(EditNodeModal): add condition to check if nodeLength is greater than arrayOfObjects.length to handle overflow scrolling correctly 2023-08-30 11:50:47 -03:00
Lucas Oliveira
3c9a6af4cd Autocomplete style fix and input type fixed for signup and login 2023-08-30 11:42:58 -03:00
Lucas Oliveira
34da831213 Reset flows cache when logged out 2023-08-30 10:34:30 -03:00
Gabriel Luiz Freitas Almeida
f100a6ca6c ⚙️ chore(pyproject.toml): add types-google-cloud-ndb package to the project dependencies 2023-08-30 10:10:49 -03:00
Gabriel Luiz Freitas Almeida
c7554a2477 🔧 chore(langfuse.py): fix import statement for Langfuse to ignore type checking 2023-08-30 10:10:39 -03:00
Gabriel Luiz Freitas Almeida
2fe8e29546 Merge branch 'release' into langfuse_integration 2023-08-30 09:53:21 -03:00
Gabriel Luiz Freitas Almeida
3fc7266d96 📦 chore(pyproject.toml): update langfuse dependency from version 1.0.2 to 1.0.13 to include bug fixes and improvements 2023-08-30 09:51:13 -03:00
Gabriel Luiz Freitas Almeida
afca3fe3e7 🔧 chore(base.py): add teardown method to Engine class for proper cleanup of the database engine
🔧 chore(base.py): add logging statement to teardown method for debugging purposes
🔧 chore(base.py): call dispose method on database engine instance in teardown method to properly release resources
🔧 chore(base.py): set database engine instance to None in teardown method to ensure proper cleanup
2023-08-30 09:51:02 -03:00
Gabriel Luiz Freitas Almeida
3efecc8b9b 🐛 fix(manager.py): add unique session id to avoid multiple clients with the same id
🐛 fix(utils.py): pass session id to process_graph function to ensure unique session id for each client
🐛 fix(base.py): pass session id to setup_callbacks function to ensure unique session id for each client
2023-08-30 09:50:19 -03:00
Gabriel Luiz Freitas Almeida
55bd1dc6ec 🔧 chore(main.py): import and add startup and shutdown events for LangfuseInstance to improve plugin functionality
🔧 chore(__init__.py): add empty file to create plugins directory structure
2023-08-30 09:49:57 -03:00
Gabriel Luiz Freitas Almeida
9559f1d684 feat(langfuse.py): add temporary implementation of LangfuseInstance class
The LangfuseInstance class is a temporary implementation that will be replaced by a plugin system in the future. This class provides methods for creating, getting, updating, and tearing down an instance of Langfuse. It uses the Langfuse library and credentials from the settings module to create the instance. If no credentials are found, the instance is set to None. The update method resets the instance and creates a new one. The teardown method flushes the instance and sets it to None.
2023-08-30 09:49:38 -03:00
anovazzi1
c64594c0a8 removed dead code 2023-08-29 22:33:19 -03:00
anovazzi1
6457725d13 fix(genericModal/index.tsx): remove debugger statement for cleaner code
fix(genericModal/index.tsx): update condition for setting nodeClass to avoid unnecessary re-rendering
2023-08-29 22:29:41 -03:00
Cristhian Zanforlin Lousa
f86c7c1689 🐛 fix(genericModal/index.tsx): add conditional check before setting nodeClass to prevent potential null or undefined value 2023-08-29 22:13:28 -03:00
Cristhian Zanforlin Lousa
89a0918dc5 🔧 fix(codeTabsComponent): remove unused useContext for isTweakPage in codeTabsComponent
🔧 fix(alertContext): remove isTweakPage and setIsTweakPage from alertContext

🔧 fix(genericModal): add null check for nodeClass before calling postValidatePrompt

🔧 fix(extraSidebarComponent): remove setIsTweakPage from extraSidebarComponent

🔧 fix(typesContext): remove isTweakPage and setIsTweakPage from typesContext
2023-08-29 22:07:18 -03:00
anovazzi1
8a772086e2 fix(api): make frontend_node field optional in ValidatePromptRequest to allow for a tweak call without a frontend_node
fix(api): handle case where frontend_node is None in post_validate_prompt to avoid attempting to update a non-existent node
2023-08-29 22:03:54 -03:00
Lucas Oliveira
daf9214513 Merge branch 'dev' into newHandleId 2023-08-29 21:22:28 -03:00
igorrCarvalho
da703d65e3 Feat: Add DropdownButton prop type 2023-08-29 18:53:39 -03:00
igorrCarvalho
6240991e0c Feat: Add Dropdown Button to main page 2023-08-29 18:47:36 -03:00
igorrCarvalho
d6f9124405 Feat[DropdownButtonComponent]: Create Dropdown Button component 2023-08-29 18:34:55 -03:00
anovazzi1
02cc23d6b1
Login (#802)
### Description
This pull request introduces a significant enhancement to the project by
incorporating robust authentication logic. The enhancement addresses the
critical need for secure user access and data protection within the
application. With this addition, the system will be able to authenticate
users, verify their identities, and provide access only to authorized
individuals.

### Changes Implemented
- **Authentication Middleware**: A new middleware module has been
implemented to intercept incoming requests and validate user
authentication. This middleware checks for valid authentication tokens
or credentials and ensures that only authenticated users can access
protected resources.

- **User Authentication Endpoint**: A new endpoint has been created to
handle user authentication. This endpoint allows users to provide their
credentials, which are then securely processed and validated against the
stored user data.

- **Password Hashing**: User passwords are now securely hashed using a
strong cryptographic algorithm before being stored in the database. This
ensures that even if the database is compromised, user passwords remain
inaccessible.

- **Token-Based Authentication**: Upon successful authentication, the
system generates a time-limited access token for the user. This token
must be included in subsequent requests to access protected resources.
Token validity is maintained through token expiration and refresh
mechanisms.

- **Authorization Checks**: The logic has been extended to include
authorization checks after successful authentication. This ensures that
authenticated users only have access to the resources they are
authorized to use, based on their roles and permissions.

### Benefits
1. **Enhanced Security**: By implementing strong authentication
mechanisms and password hashing, the project significantly improves
security, minimizing the risk of unauthorized access or data breaches.

2. **User-Friendly Experience**: Users can securely access the
application, confident in the knowledge that their credentials and data
are protected. The token-based authentication simplifies the user
experience by eliminating the need for frequent re-authentication.

3. **Scalability**: The authentication logic has been designed with
scalability in mind, ensuring that the system can handle a growing
number of users and requests without compromising security or
performance.

4. **Modularity**: The new authentication logic has been integrated as a
separate module, enhancing the project's modularity and maintainability.
2023-08-29 17:38:20 -03:00
Gabriel Luiz Freitas Almeida
d5faee5c67
Adds MetalRetriever, HugginfaceEndpoint and other bugfixes (#837) 2023-08-29 20:38:05 +00:00
Gabriel Luiz Freitas Almeida
70e5b11aa7 🔥 refactor(test_llms_template.py): comment out unused test_llms_settings function to improve code readability and remove dead code 2023-08-29 17:36:19 -03:00
Gabriel Luiz Freitas Almeida
0c133c48ce 🔖 chore(pyproject.toml): bump version to 0.4.17 for langflow package 2023-08-29 17:34:28 -03:00
Gabriel Luiz Freitas Almeida
3d9533a98a
🔀 refactor(OpenAIConversationalAgent.py): remove unused openai_api_base parameter to improve code readability and maintainability (#838) 2023-08-29 20:33:31 +00:00
Gabriel Luiz Freitas Almeida
40f78cc13b
Merge branch 'main' into release 2023-08-29 20:28:20 +00:00
Gabriel Luiz Freitas Almeida
8f27c71553
Bugfix - InputListComponent expect an array as Input() (#830) 2023-08-29 20:25:28 +00:00
Alexandre Henrique Pereira Tavares
251bf39830
Hg endpoints (#836)
Added component to use an LLM model from Hugging Face Inference API.
2023-08-29 17:23:18 -03:00
anovazzi1
cf8df6c62b fix(users.py): update error message to be more generic and not reveal specific reason for username unavailability
fix(AdminPage/index.tsx): fix nullish assertion for create_at and updated_at properties to avoid potential errors
fix(signUpPage/index.tsx): fix error handling to correctly display error message
fix(types/components/index.ts): make id, create_at, and updated_at properties optional in UserInputType
2023-08-29 16:44:15 -03:00
Alexandre Henrique
9530230c2c Fixed the connection to the forward component 2023-08-29 16:34:40 -03:00
anovazzi1
d73b3b0b52 fix(users.py): improve error message when trying to add a user with an already claimed username 2023-08-29 16:26:15 -03:00
Lucas Oliveira
2cfd772387 React Flow update and minor style fixes 2023-08-29 15:42:30 -03:00
Gabriel Luiz Freitas Almeida
4bb7181587 🔀 refactor(OpenAIConversationalAgent.py): remove unused openai_api_base parameter to improve code readability and maintainability
🔀 refactor(OpenAIConversationalAgent.py): make openai_api_base parameter optional with a default value of None for better flexibility and backward compatibility
2023-08-29 15:25:55 -03:00
Cristhian Zanforlin Lousa
27455cbd77 Merge branch 'login' of https://github.com/logspace-ai/langflow into login 2023-08-29 11:46:52 -03:00
Cristhian Zanforlin Lousa
3e55e5f394 🐛 fix(headerComponent): change Sign out button to anchor tag for better accessibility and consistency
 feat(headerComponent): add Home link when on admin page for easier navigation
 feat(headerComponent): add Admin page link for easier navigation to admin page
🐛 fix(ApiKeysPage): handle case when api_keys.name is null or undefined by displaying "-" instead
🐛 fix(ApiKeysPage): handle case when api_keys.last_used_at is an invalid date by displaying "Never" instead
 feat(ApiKeysPage): add Total Uses column to display the total number of uses for each API key
🐛 fix(loginPage): set isAdmin context variable based on user's is_superuser property
🐛 fix(loginPage): increase delay before fetching logged user to 500ms for better user experience
🐛 fix(types): add total_uses property to ApiKey type to match backend response
2023-08-29 11:46:48 -03:00
Gabriel Luiz Freitas Almeida
8c77613f72 🔀 refactor(utils.py): change return type annotation of authenticate_user function from Union[User, None] to Optional[User] for clarity and consistency 2023-08-29 10:45:10 -03:00
Gabriel Luiz Freitas Almeida
408caea750 🔒 chore(api.tsx): refactor request interceptor logic to improve readability and maintainability 2023-08-29 10:40:09 -03:00
Alexandre Henrique
e7f94f23e4 added huggingface endpoints 2023-08-29 00:31:55 -03:00
igorrCarvalho
787c7844f5 Merge login into login 2023-08-28 20:44:05 -03:00
igorrCarvalho
5b75d44c3e Fix: remove admin page and signout on flow page 2023-08-28 20:41:54 -03:00
anovazzi1
166cd7e9f0 added flex to avoid scroll bug on admin page 2023-08-28 20:33:39 -03:00
anovazzi1
bf81507447 feat(AdminPage): add support for displaying user ID, creation date, and update date in the user table
fix(AdminPage): add type annotations to user variables in filter and map functions to improve type safety
2023-08-28 20:07:52 -03:00
igorrCarvalho
21ef1b43c7 fix: Remove redundant button on admin page header 2023-08-28 20:04:56 -03:00
igorrCarvalho
bb4ed111ef fix: Remove redundant button on admin page header 2023-08-28 19:58:25 -03:00
anovazzi1
d1ffe5ab11 fix glitch on apiKey page 2023-08-28 18:59:59 -03:00
Matheus Jacques
d4ecb9896d 🔧 chore(main.tf): add installation of git and docker-compose to improve deployment process
 feat(main.tf): add cloning of langflow repository and checkout to celery branch for specific project requirements
2023-08-28 23:42:24 +02:00
Cristhian Zanforlin Lousa
6c03edc50a 🐛 fix(auth.py): set AUTO_LOGIN to False to disable automatic login as a super user
🐛 fix(API/index.ts): add null check for response object before checking status to prevent potential error
2023-08-28 18:22:59 -03:00
Gabriel Luiz Freitas Almeida
acd661f629 🔧 chore(__main__.py): remove unused imports and functions to improve code cleanliness and maintainability
🔧 chore(main.py): update import statement to use get_number_of_workers from __main__ module
🔧 chore(util.py): remove unused imports and functions to improve code cleanliness and maintainability
2023-08-28 18:09:26 -03:00