Commit graph

5,500 commits

Author SHA1 Message Date
anovazzi1
60945ce883 added check to onCloseWebsocket event 2023-08-30 18:49:41 -03:00
Gabriel Luiz Freitas Almeida
3a90b07235 fix exception 2023-08-30 18:18:22 -03:00
Gabriel Luiz Freitas Almeida
1407719f2f 🐛 fix(chat.py): handle unauthorized error in chat websocket to return WS_1008_POLICY_VIOLATION status code and "Unauthorized" reason 2023-08-30 18:12:03 -03:00
anovazzi1
418bddd322 fix(formModal): encode the accessToken parameter in the chatEndpoint URL to handle special characters correctly
The accessToken parameter in the chatEndpoint URL is now encoded using the encodeURIComponent function to handle special characters correctly. This ensures that the accessToken is properly passed to the chat endpoint without causing any issues.
2023-08-30 18:01:21 -03:00
Gabriel Luiz Freitas Almeida
9d7deccc53 🐛 fix(chat.py): handle and log any exception that occurs in the chat websocket to prevent unhandled errors and provide better error messages 2023-08-30 17:54:58 -03:00
Gabriel Luiz Freitas Almeida
163a7c49cd 🐛 fix(utils.py): fix TypeError when comparing offset-naive and offset-aware datetimes in get_current_user function 2023-08-30 17:51:57 -03:00
igorrCarvalho
158ef9a9ea Refactor: Remove duplicate login button and bring back button borders back 2023-08-30 17:48:17 -03:00
Gabriel Luiz Freitas Almeida
de08475bdf Merge remote-tracking branch 'origin/dev' into fix_display_prompt 2023-08-30 17:45:16 -03:00
Gabriel Luiz Freitas Almeida
61f0a93cc6 🔥 refactor(manager.py): remove redundant code in connect method by removing unnecessary await websocket.accept() call 2023-08-30 17:40:22 -03:00
igorrCarvalho
4739372e20 Refactor: Add trim() to signUp page 2023-08-30 17:40:18 -03:00
Gabriel Luiz Freitas Almeida
a8b9c08a9d 🐛 fix(base.py): fix issue with loading and saving secret key in Settings class
🐛 fix(utils.py): fix issue with writing secret key to file in write_secret_to_file function
2023-08-30 17:39:51 -03:00
Gabriel Luiz Freitas Almeida
eacf558e70 🐛 fix(chat.py): close websocket connection with status code 1008 and reason "Unauthorized" if user is not authenticated or inactive
🐛 fix(auth/utils.py): raise credentials_exception if token has expired
2023-08-30 17:29:07 -03:00
igorrCarvalho
35e24610af Refactor: Add trim() to login form 2023-08-30 17:29:00 -03:00
Gabriel Luiz Freitas Almeida
53b9565ac6 Merge remote-tracking branch 'origin/dev' into fix_secret_key 2023-08-30 16:48:04 -03:00
Cristhian Zanforlin Lousa
66a9056b92 Merge branch 'feat-dict' of https://github.com/logspace-ai/langflow into feat-dict 2023-08-30 16:38:08 -03:00
Cristhian Zanforlin Lousa
35322e7d55 🐛 fix(parameterComponent): import KeypairListComponent from correct path to fix compilation error
 feat(parameterComponent): add support for editing key-value pairs in the parameter component
🐛 fix(genericIconComponent): fix stroke width prop name to strokeWidth to fix SVG rendering issue
🐛 fix(keypairListComponent): import GenericModal from correct path to fix compilation error
 feat(keypairListComponent): add support for editing key-value pairs in the keypair list component
🐛 fix(editNodeModal): import KeypairListComponent from correct path to fix compilation error
 feat(editNodeModal): add support for editing key-value pairs in the edit node modal
🐛 fix(types): change value type in KeyPairListComponent to any to allow for any key-value pair
2023-08-30 16:37:53 -03:00
Gabriel Luiz Freitas Almeida
269116b834 🐛 fix(test_cli.py): convert temp_dir to string before checking if it is in COMPONENTS_PATH to ensure comparison correctness 2023-08-30 16:25:52 -03:00
Gabriel Luiz Freitas Almeida
b3c2fd26a5 🐛 fix(base.py): fix import statements for read_secret_from_file and write_secret_to_file functions
🔒 chore(utils.py): add write_secret_to_file and read_secret_from_file functions to handle secret key file read/write operations
2023-08-30 16:14:27 -03:00
Gabriel Luiz Freitas Almeida
971d777074 🔧 chore(pyproject.toml): add markupsafe dependency to improve compatibility and security
🔧 chore(pyproject.toml): add pywin32 dependency for Windows platform to support specific functionality
2023-08-30 16:05:53 -03:00
Gabriel Luiz Freitas Almeida
e2e890464f 🔧 fix(base.py): import set_secure_permissions function from utils module to fix NameError
🔒 feat(utils.py): add set_secure_permissions function to set secure file permissions based on the operating system
2023-08-30 15:53:32 -03:00
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
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