Commit graph

5,500 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
5feb98466c start state for nestedDict 2023-09-26 20:55:46 -03:00
anovazzi1
c77a93b6d9 fix(MainPage): only set isDragging to true if the dragged item is a file to prevent unnecessary state changes 2023-09-26 20:55:25 -03:00
anovazzi1
cb74a0fb44 fix(nodeToolbarComponent): add check to disable button when nodeLength is 0 to prevent unwanted actions
feat(nodeToolbarComponent): add event handler to ignore events with "disabled" keyword to prevent unwanted actions
2023-09-26 20:39:26 -03:00
anovazzi1
fdde05d29e fix(baseModal): update onChangeOpenModal prop type to accept an optional boolean parameter to improve flexibility and avoid potential errors 2023-09-26 20:15:04 -03:00
Gabriel Luiz Freitas Almeida
5ec118cc6f 🐛 fix(custom_component.py): improve error message formatting for type hint error in build method
The error message for a type hint error in the build method was improved to provide clearer instructions. The traceback message was updated to suggest using PromptTemplate instead of Prompt type. This change improves the readability and usability of the error message.
2023-09-26 20:06:38 -03:00
Gabriel Luiz Freitas Almeida
f506fd1625 🔥 chore(deploy): remove unused docker-compose.test.yml file
🔧 chore(deploy): update docker-compose.override.yml to version 3.8

📦 chore(docker-compose.with_tests.yml): add docker-compose file with tests configuration

This commit adds a new docker-compose file named `docker-compose.with_tests.yml` which includes the configuration for running tests. The file includes the following services:

- `proxy`: Configures Traefik as a reverse proxy with Docker integration and enables access logs, the Traefik dashboard, and API.
- `backend`: Sets up the backend service with dependencies on a database, message broker, and result backend. It also includes labels for Traefik routing.
- `db`: Configures a PostgreSQL database with a volume for data persistence.
- `pgadmin`: Sets up pgAdmin for managing the PostgreSQL database.
- `result_backend`: Configures a Redis instance for the result backend.
- `celeryworker`: Sets up a Celery worker for background task processing.
- `flower`: Configures Flower for monitoring and managing Celery workers.
- `frontend`: Sets up the frontend service with labels for Traefik routing.
- `broker`: Configures RabbitMQ with the management console.
- `prometheus`: Sets up Prometheus for monitoring.
- `grafana`: Configures Grafana for visualization and monitoring.
- `tests`: Extends the `backend` service and runs pytest for running tests.

This file allows running the application with the necessary services for testing and monitoring.

🔧 chore(docker-compose.yml): add missing volumes and networks for services
🔧 chore(docker-compose.yml): add traefik-public network with configurable external setting for flexibility in testing

📝 docs(async-tasks.mdx): update docker-compose command to use the correct file name for running tests
2023-09-26 19:58:50 -03:00
Gabriel Luiz Freitas Almeida
868515958e 📝 docs(async-api.mdx): add response example for async API request to improve documentation clarity 2023-09-26 19:45:08 -03:00
anovazzi1
6fd2b0c743 fix(tabsContext.tsx): add optional 'silent' parameter to the saveFlow function to control whether to show success message or not
fix(PageComponent/index.tsx): pass 'true' as the second argument to the saveFlow function to prevent showing success message when saving flow every 30 seconds
fix(types/tabs/index.ts): update the saveFlow function signature to include the optional 'silent' parameter
2023-09-26 19:44:19 -03:00
Cristhian Zanforlin Lousa
1b3564ed3d 🔥 refactor(PageComponent/index.tsx): remove console.log statement for improved code cleanliness 2023-09-26 19:44:19 -03:00
Cristhian Zanforlin Lousa
230a8b3826 🐛 fix(PageComponent/index.tsx): add timer to automatically save flow every 30 seconds to prevent data loss 2023-09-26 19:44:19 -03:00
Gabriel Luiz Freitas Almeida
af35ae315e 📝 docs(async-api.mdx): update endpoint path for checking task status to improve consistency and clarity
🐛 fix(endpoints.py): update endpoint path for checking task status to match the updated path in the documentation

🐛 fix(schemas.py): add TaskResponse schema to properly handle task response data

🐛 fix(locustfile.py): update endpoint path for polling task status to match the updated path in the endpoints

🐛 fix(test_endpoints.py): update helper function and test cases to use the new task response structure and endpoint path for polling task status
2023-09-26 19:34:50 -03:00
Cristhian Zanforlin Lousa
a0c4da7d76 🐛 fix(EditNodeModal): add missing useRef import to fix compilation error
 feat(EditNodeModal): use useRef to store and update data instead of useState to improve performance and prevent unnecessary re-renders

🐛 fix(EditNodeModal): fix references to myData.node to myData.current.node to correctly access the current node data
2023-09-26 19:07:34 -03:00
Gabriel Luiz Freitas Almeida
a6ba2a24d8
Fixes type hint "prompt" (#969) 2023-09-26 17:20:03 -03:00
Gabriel Luiz Freitas Almeida
84bf3c83e3 📝 docs(guidelines): add async-api.mdx to provide documentation on asynchronous processing feature
📝 docs(guides): add async-tasks.mdx to provide a guide on using the Async API implementation

📝 docs(sidebars.js): update sidebar to include async-api.mdx and async-tasks.mdx in the appropriate sections
2023-09-26 17:18:13 -03:00
Gabriel Luiz Freitas Almeida
099869f0a6 Remove untested setup 2023-09-26 17:18:13 -03:00
Gabriel Luiz Freitas Almeida
c8c01402ff 🐛 fix(custom_component.py): raise HTTPException when build method contains prompt type argument to improve error handling and provide more informative error message
🐛 fix(types.py): re-raise HTTPException when encountered during building langchain template custom component to propagate the error and provide more informative error message
2023-09-26 15:46:39 -03:00
Gabriel Luiz Freitas Almeida
f49a54879d 🔧 chore(auth.py): refactor get_secret_key method for improved readability and maintainability
🔒 chore(auth.py): update logging level to debug for CONFIG_DIR not provided case in get_secret_key method
2023-09-26 15:35:45 -03:00
Gabriel Luiz Freitas Almeida
bf62ccfd21 🔧 chore(auth.py): refactor get_secret_key method for improved readability and maintainability
🔒 chore(auth.py): update logging level to debug for CONFIG_DIR not provided case in get_secret_key method
2023-09-26 15:35:12 -03:00
Gabriel Luiz Freitas Almeida
553bf51a7f fix formatting 2023-09-26 15:24:49 -03:00
Gabriel Luiz Freitas Almeida
7ff3ce619e 🔧 refactor(__main__.py): reorganize imports and remove unused imports to improve code readability and maintainability
🔧 refactor(__main__.py): reorganize imports and remove unused imports to improve code readability and maintainability
2023-09-26 15:23:37 -03:00
Gabriel Luiz Freitas Almeida
8e42cc2035 🔀 refactor(__main__.py): rename functions and imports to improve code readability and maintainability 2023-09-26 15:21:05 -03:00
Gabriel Luiz Freitas Almeida
d05e085c4c 🐛 fix(auth.py): change refresh token expiration time from 70 minutes to 12 hours for better security and usability
 feat(auth.py): add logging statements to provide more visibility into secret key generation and saving process
🐛 fix(auth.py): handle IOError when reading or writing secret key to prevent unexpected failures
2023-09-26 15:14:20 -03:00
Cristhian Zanforlin Lousa
536e9d8f47 merge fix 2023-09-26 12:08:19 -03:00
Cristhian Zanforlin Lousa
df3ce5a3d8 🐛 fix(parameterComponent): add support for 'int' type in conditional rendering to display a component
 feat(parameterComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(codeTabsComponent): import missing functions from reactflowUtils to fix build error
 feat(codeTabsComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
 feat(codeTabsComponent): add DictComponent and KeypairListComponent to handle 'dict' and 'NestedDict' types
🐛 fix(ApiModal): import missing function from reactflowUtils to fix build error
 feat(ApiModal): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(types): add Object type to buildTweakObject function in codeTabsPropsType
🐛 fix(reactflowUtils): add missing convertArrayToObj function to convert array of objects to object
 feat(reactflowUtils): add convertArrayToObj function to convert array of objects to object

🐛 fix(utils.ts): fix indentation and formatting issues in groupByFamily function
🐛 fix(utils.ts): fix indentation and formatting issues in buildTweakObject function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonApiCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getCurlCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getChatComponentCode function
2023-09-26 12:07:31 -03:00
Gabriel Luiz Freitas Almeida
1773f3fda8
🐛 fix(utils.ts): change parameter name from apiKey to api_key to improve consistency and readability (#968) 2023-09-26 11:45:57 -03:00
Gabriel Luiz Freitas Almeida
8deeeb5ba3 🐛 fix(utils.ts): change parameter name from apiKey to api_key to improve consistency and readability
 feat(utils.ts): add support for x-api-key header in run_flow function to pass the API key as a header instead of a query parameter
🔧 chore(utils.ts): update getCurlCode function to use x-api-key header instead of api-key header for authentication
2023-09-26 11:45:12 -03:00
Gabriel Luiz Freitas Almeida
734ab6b983
chore: remove lc-serve (#963) 2023-09-26 11:24:58 -03:00
Gabriel Luiz Freitas Almeida
4a3dae5ed6 Merge remote-tracking branch 'origin/dev' into remove-jcloud 2023-09-26 11:24:15 -03:00
Cristhian Zanforlin Lousa
0e6b38c427 🔥 refactor(dictAreaModal/index.tsx): remove unnecessary console.log statement
The console.log statement was not providing any useful information and was removed to improve code cleanliness and performance.
2023-09-26 11:21:49 -03:00
Cristhian Zanforlin Lousa
f56dcc03b0 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-09-26 11:21:38 -03:00
Cristhian Zanforlin Lousa
6803cd1d8c 🐛 fix(dictComponent): fix useEffect dependency to onChange instead of value to prevent unnecessary re-rendering
🐛 fix(keypairListComponent): add rows prop to Textarea components to fix rendering issue

🐛 fix(EditNodeModal): remove unused state variables and fix rendering issue with dict and NestedDict types

🐛 fix(dictAreaModal): fix useEffect dependency to dictObj instead of value to prevent unnecessary re-rendering
2023-09-26 11:21:30 -03:00
Gabriel Luiz Freitas Almeida
305838b3da Update lock 2023-09-26 11:19:45 -03:00
Gabriel Luiz Freitas Almeida
12a5dd8fde 🐛 fix(utils.py): handle cases where file.filename is not a string or Path object to prevent errors
🔧 chore(utils.py): refactor save_uploaded_file function to improve code readability and maintainability
2023-09-26 11:13:48 -03:00
Gabriel Luiz Freitas Almeida
83351ba639
📝 docs(api.mdx): add documentation for API Keys in Langflow (#967) 2023-09-26 11:10:15 -03:00
Gabriel Luiz Freitas Almeida
8b27152712 📝 docs(api.mdx): add documentation for API Keys in Langflow
🔀 chore(sidebars.js): uncomment API guidelines in the sidebar
🖼️ chore(api-key.png): add image for API Key documentation
2023-09-26 10:55:54 -03:00
anovazzi1
41d18edc97 update package lock json 2023-09-26 10:46:55 -03:00
anovazzi1
b833d45fd1
Adds async processing, session management and a starter cloud setup (#921)
This PR adds the ability to use Redis as cache, Celery for task
execution, Session management, async tasks for the API and some other
improvements.

Run the following command after setting up the .env file in `./deploy`
folder:
```bash
docker compose up --exit-code-from tests tests result_backend broker celeryworker db --build
```
2023-09-26 10:34:38 -03:00
Gabriel Luiz Freitas Almeida
a85b39e048 🔥 refactor(sidebars.js): comment out "guidelines/api" section to temporarily remove it from the sidebar
ℹ️ The "guidelines/api" section is temporarily removed from the sidebar to prevent confusion and ensure consistency while it is being updated or revised.
2023-09-26 10:33:53 -03:00
Gabriel Luiz Freitas Almeida
3bb755bbeb 📚 docs(sidebars.js): add missing login and api guidelines and remove login guide from step-by-step guides
📚 docs(sidebars.js): add missing login and api guidelines to the guidelines section and remove login guide from step-by-step guides
2023-09-26 10:33:34 -03:00
Gabriel Luiz Freitas Almeida
afa66112e1 📝 docs(login.mdx): add documentation for login functionality in Langflow
The login functionality in Langflow serves to authenticate users and protect sensitive routes in the application. This commit adds documentation for the login functionality, including information about the enhanced login mechanism introduced in version 0.5. It explains the environment variables that are crucial in configuring the login settings and provides instructions on how to set them securely. It also covers the command-line interface for managing superusers and provides details on the sign-up process and profile settings for users. Screenshots are included to illustrate the sign-up page, profile settings page, and admin page.
2023-09-26 10:21:59 -03:00
Gabriel Luiz Freitas Almeida
bfdb9de879 🐛 fix(test_user.py): fix incorrect assertion in test_patch_user function 2023-09-26 10:21:39 -03:00
Cristhian Zanforlin Lousa
cc9f834178 🐛 fix(authContext.tsx): update cookie names for access token and refresh token to improve clarity and consistency
🐛 fix(api.tsx): update cookie names for access token and refresh token to match changes in authContext.tsx
2023-09-26 10:21:04 -03:00
Cristhian Zanforlin Lousa
5c57e62f55 🔄 refactor(keypairListComponent): replace Input component with Textarea component for key and value inputs
🐛 fix(keypairListComponent): fix incorrect prop name in Textarea component for value input
2023-09-26 08:19:31 -03:00
Gabriel Luiz Freitas Almeida
12a46b6936 🐛 fix(login.py): re-raise HTTPException if it is already raised to prevent overriding the original exception 2023-09-25 22:09:46 -03:00
Gabriel Luiz Freitas Almeida
c6882a0598 🐛 fix(login.py): move user authentication logic outside of try-except block to ensure proper error handling
 feat(login.py): add endpoint for auto login to improve user experience
2023-09-25 20:56:39 -03:00
Gabriel Luiz Freitas Almeida
62a4e94c71 🔧 fix(api_key.py): remove unnecessary sa_relationship_kwargs to improve code readability and maintainability
🔧 fix(user.py): add sa_relationship_kwargs to api_keys relationship to enable cascading delete when deleting a user
2023-09-25 19:58:21 -03:00
Gabriel Luiz Freitas Almeida
1e0f81c135 🐛 fix(login.py): handle exceptions in login_to_get_access_token function to provide more detailed error messages
🐛 fix(users.py): only hash password if user is a superuser to prevent regular users from changing their password
2023-09-25 19:34:17 -03:00
Gabriel Luiz Freitas Almeida
4be21db30c 🔧 chore(user.py): add optional 'username' field to UserUpdate model for better flexibility in updating user information 2023-09-25 19:14:09 -03:00
Gabriel Luiz Freitas Almeida
3a4ae5e37b 🐛 fix(users.py): prevent non-superusers from changing their password 2023-09-25 19:12:57 -03:00
Gabriel Luiz Freitas Almeida
de4262faa6 🐛 fix(endpoints.py): fix argument passed to save_uploaded_file function to correctly save the uploaded file
🐛 fix(utils.py): fix argument type in save_uploaded_file function to correctly handle UploadFile object
2023-09-25 18:59:21 -03:00