Commit graph

10,667 commits

Author SHA1 Message Date
Mendon Kissling
c32a5e83db
Add chinese README and language type navigation to the main README. (#2069)
Modification content includes:

Add a Chinese version of the README.
Add multilingual version navigation to the top of the main README.
2024-06-05 10:55:38 -04:00
Mendon Kissling
b81d82f49b
[Docs] - Migration Folder (#2066)
* Move input/output and text/record to components, and combine docs into
one
* Combine global env docs into one 
* Update links
* Remove unused files
* Clean up docs for compatibility, migration, and possible install
issues
2024-06-05 10:18:43 -04:00
ogabrielluiz
374f1fbde3 chore: Update Poetry version to 1.8.2 2024-06-05 09:45:10 -03:00
ogabrielluiz
6cecb527a3 chore: Bump langflow-base version to 0.0.56 2024-06-05 09:13:42 -03:00
Jackie Moo
d8643d1384
Correctly Handle Text File Encoding to Avoid 'GBK' Codec Errors (#2072) 2024-06-05 04:47:40 -07:00
Nicolò Boschi
ba59a9f449
docker: improve image layout and backend-only/frontend-only images (#2071)
* docker: improve image layout and backend-only image

* add tests

* add tests

* add frontend

* add frontend

* label

* fix
2024-06-05 04:46:14 -07:00
Gabriel Luiz Freitas Almeida
b74dd3fa7d
Upgrade couchbase dependency to version 4.2.1 with extras and make it optional (#2073)
* ⬆️ (pyproject.toml): upgrade couchbase dependency to version 4.2.1 with extras and make it optional
🔧 (pyproject.toml): add couchbase to the couchbase extras section for better organization and management of dependencies
2024-06-05 04:38:13 -07:00
mojunneng
4365cf31e2 Update Chinese README. 2024-06-05 15:00:18 +08:00
mojunneng
6addb9636c Update README and add Chinese README. 2024-06-05 11:50:57 +08:00
Cristhian Zanforlin Lousa
610753fbff
Add lazy load on router to improve bootstrap application performance (#2050)
 (routes.tsx): implement lazy loading for route components to improve
performance
 (routes.tsx): add Suspense fallback with LoadingComponent for better
UX during lazy loading
2024-06-04 17:50:45 -03:00
Mendon Kissling
f1ef45e414 fix-links 2024-06-04 16:37:02 -04:00
Mendon Kissling
37c5e277a5 Merge branch 'dev' into docs-migration-folder 2024-06-04 16:29:19 -04:00
Mendon Kissling
9fc7691723 remove-empty-files 2024-06-04 16:28:50 -04:00
Mendon Kissling
0b1a4b4232 cleanup 2024-06-04 16:28:44 -04:00
Mendon Kissling
f74e0f0b80 fix-links 2024-06-04 16:21:44 -04:00
Mendon Kissling
9a515e7f8e move-doc 2024-06-04 16:21:40 -04:00
Mendon Kissling
689de35d14 fix-link 2024-06-04 16:21:27 -04:00
Mendon Kissling
8ab21e8ced text-and-record 2024-06-04 16:21:07 -04:00
Mendon Kissling
4841cd9e66 combine-input-and-output-docs 2024-06-04 15:21:59 -04:00
Mendon Kissling
c371cbc22b combine-global-env-docs 2024-06-04 15:21:24 -04:00
Nicolò Boschi
82a3733ed7
setting fallback_to_env_var should be respected in api calls (#2058) 2024-06-04 09:36:52 -07:00
Gabriel Luiz Freitas Almeida
22a7b7e75f
(refactor) Update pytest arguments in Makefile for better test execution (#2063)
* refactor: Update pytest arguments in Makefile for better test execution

The Makefile has been modified to update the pytest arguments in the `tests` target. The `--instafail` flag has been replaced with `-ra -n auto -m "not api_key_required"`. This change allows for better test execution by including additional options for reporting, parallelization, and test selection.

Note: The commit message has been generated based on the provided code changes and recent commits.

*  (test_endpoints.py): add pytest marker 'api_key_required' to mark tests that require an API key for authorization. This helps in easily identifying and managing tests that need special permissions.
2024-06-04 08:59:02 -07:00
Mendon Kissling
dae11df7da
[Docs] - Update gif (#2062)
* Update docs gif to align with readme
2024-06-04 10:46:02 -04:00
Mendon Kissling
fedbf906d9 update-gif 2024-06-04 10:37:30 -04:00
ogabrielluiz
23d3c45a1b refactor: Update Dockerfile and render.yaml for pre-release deployment
The Dockerfile `render.pre-release.Dockerfile` has been added to the repository, which sets the base image to `langflowai/langflow:1.0-alpha`. Additionally, the `render.yaml` file has been modified to use the new Dockerfile path `./docker/render.pre-release.Dockerfile` for the `langflow` web service. This change ensures that the pre-release version of the application is deployed correctly.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 14:05:33 -03:00
ogabrielluiz
25b99ef590 📝 (README.md): Update deployment links to point to the correct branches for deployment purposes 2024-06-03 14:03:23 -03:00
Gabriel Luiz Freitas Almeida
d2f144829d
Update uvicorn server configuration and add pool config (#2052)
The Makefile has been updated to add support for specifying the number
of workers for the uvicorn server. The pyproject.toml file has also been
updated to upgrade the uvicorn dependency to version 0.30.0.
Additionally, the DatabaseService class in service.py has been
refactored to use the pool_size and max_overflow settings from the
SettingsService. This change allows for better control over the number
of connections in the connection pool and the number of connections that
can be opened beyond the pool size. The create_engine function has also
been modified to pass the pool_size and max_overflow parameters.
2024-06-03 09:10:02 -07:00
ogabrielluiz
5ea2699b29 refactor: Update DatabaseService to use settings_service for database URL 2024-06-03 13:08:12 -03:00
ogabrielluiz
ced4fd0800 refactor: Update OpenAIModelComponent to use float type for temperature parameter
The OpenAIModelComponent class in OpenAIModel.py has been updated to use the float type for the temperature parameter instead of the Optional[float] type. This change ensures consistency and improves code readability. The default value for the temperature parameter remains unchanged at 0.1.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 13:05:37 -03:00
ogabrielluiz
06df938c00 refactor: Update DatabaseService to use settings_service for database URL
The DatabaseService class in service.py has been updated to use the settings_service object for retrieving the database URL instead of directly passing it as a parameter. This change improves code organization and ensures consistency with other services that rely on the settings_service. The necessary modifications have been made in both the DatabaseService class and the DatabaseServiceFactory class.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 13:04:56 -03:00
ogabrielluiz
099d44bad0 refactor: Update database service to use pool_size and max_overflow settings
The DatabaseService class in service.py has been updated to use the pool_size and max_overflow settings from the SettingsService. This change allows for better control over the number of connections in the connection pool and the number of connections that can be opened beyond the pool size. The commit also includes necessary modifications to the create_engine function to pass the pool_size and max_overflow parameters.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 13:02:49 -03:00
ogabrielluiz
6033c14875 🔧 (Makefile): Add support for specifying the number of workers for uvicorn server
⬆️ (pyproject.toml): Upgrade uvicorn dependency to version 0.30.0
2024-06-03 12:56:54 -03:00
cristhianzl
4efde816b5 (routes.tsx): implement lazy loading for route components to improve performance
 (routes.tsx): add Suspense fallback with LoadingComponent for better UX during lazy loading
2024-06-03 10:48:04 -03:00
ogabrielluiz
5fe568cc6c refactor: Update factory_restart_space.py to use environment variable for Hugging Face API token 2024-06-03 09:54:47 -03:00
ogabrielluiz
aafaa166b4 chore: Update package versions in pyproject.toml files 2024-06-03 09:35:57 -03:00
ogabrielluiz
bbe792b3e1 refactor: Update process_tweaks function to include stream parameter
The process_tweaks function in endpoints.py has been updated to include a new stream parameter. This change allows for more flexibility in processing tweaks based on the stream value. The commit also includes necessary modifications to the simple_run_flow function to pass the stream parameter to the process_tweaks function.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 09:31:40 -03:00
ogabrielluiz
758d6af7ef refactor: Update factory_restart_space.py to use environment variable for Hugging Face API token
The factory_restart_space.py script has been updated to use the value of the HUGGINFACE_API_TOKEN environment variable for the HfApi client token. This change improves security by avoiding hardcoding the token in the script and allows for flexibility in different environments.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-02 20:36:59 -03:00
Rodrigo
aca541e97b Default temperature parameter enhancement 2024-06-01 23:34:08 -03:00
Gabriel Luiz Freitas Almeida
fce2ca3a9c
Update docker-build.yml 2024-05-31 13:43:16 -07:00
Gabriel Luiz Freitas Almeida
0b584fe731
refactor: Update getCurlRunCode function to export it as a named export (#2037)
The getCurlRunCode function in get-curl-code.tsx has been updated to export it as a named export instead of the default export. This change improves the code organization and allows for better import statements in other modules.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 11:21:51 -07:00
ogabrielluiz
20af601ad7 refactor: Update getCurlRunCode function to export it as a named export
The getCurlRunCode function in get-curl-code.tsx has been updated to export it as a named export instead of the default export. This change improves the code organization and allows for better import statements in other modules.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 15:21:02 -03:00
Gabriel Luiz Freitas Almeida
5e2f4b8f83
Add webhook endpoint, and other fixes (#1766)
* Update FastAPI app configuration in main.py

* Add webhook endpoint

* Add Observer model and related changes to database models

* Update refresh button text in ParameterComponent

* Update database models and main.py, and add webhook endpoint and utils for flow model

* Add WebhookComponent to langflow data components

* Update webhook component names in flow data and remove unused code in edge/base.py and graph/base.py

* 🐛 (endpoints.py): fix an issue where the user_id was not being correctly assigned based on the api_key_user or flow object

* 📝 (endpoints.py): Update documentation for the webhook_run_flow endpoint to provide clearer information on its purpose, arguments, and return value. Remove outdated request JSON structure and example request sections. Add information on the arguments and exceptions raised for better clarity.

* chore: Remove unnecessary trailing commas in code files

* feat: Add yield statement to get_lifespan function

* feat: Update webhook columns revision ID

* Refactor import statements for OpenAI conversational agent

* refactor(constants.ts): remove unused tabsArray function and update function name to createTabsArray for clarity
feat(constants.ts): add support for including webhook code in tabs array based on flow webhook property
feat(index.tsx): update function calls to use new createTabsArray function and include webhook code in tabs array based on flow webhook property

refactor(utils.ts): remove trailing commas in function parameters to improve code consistency and readability
feat(utils.ts): add support for including webhook cURL code and tweaks code in tabs array creation for better code organization and presentation

* chore: Update folder_id parameter type to str in API endpoints

* feat: Handle invalid JSON payload in WebhookComponent

The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data. The commit also includes a message that describes the invalid JSON payload for better error tracking.

Note: This commit message follows the convention used in the recent user commits.

* refactor: Remove unnecessary code in main.py

* refactor: Update Alembic revision IDs for webhook columns

The Alembic revision IDs for adding webhook columns have been updated to reflect the latest changes. This ensures consistency and proper tracking of the database schema modifications.

Note: The commit message has been generated based on the provided code changes and recent commits.

* 🐛 (endpoints.py): Fix handling of flow_id_or_name variable to correctly identify flow ID or endpoint name for running a flow. Improve error handling for invalid UUID strings and flow not found scenarios.

* refactor: Handle invalid JSON payload in WebhookComponent

The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data.

* refactor: Update get_flow_by_id function to handle None flow_id parameter

The get_flow_by_id function in utils.py has been updated to handle the case where the flow_id parameter is None. Previously, the function would raise an exception if flow_id was not provided. Now, if flow_id is None, the function returns None instead of querying the database. This change improves the robustness of the function and allows for more flexible usage.

Note: The commit message has been generated based on the provided code changes and recent commits.

* 📝 (endpoints.py): Add import statement for get_flow_by_id_or_endpoint_name function
📝 (flow.py): Add get_flow_by_id_or_endpoint_name function to retrieve a Flow object by ID or endpoint name

* refactor: Update get_flow_by_id_or_endpoint_name function to handle None flow_id parameter

* 🐛 (flow.py): replace ValueError with HTTPException to return a 404 status code when flow identifier is not found

* refactor: Update error message for flow identifier not found

The code changes in `test_endpoints.py` update the error message when a flow identifier is not found. Previously, the error message referenced the flow ID directly, but now it uses the more generic term "Flow identifier" to account for cases where the identifier could be an endpoint name. This change improves the clarity and flexibility of the error message.

Note: This commit message has been generated based on the provided code changes and recent commits.

* 🔧 (endpoints.py): remove unnecessary flow_id_or_name parameter from the simple_run_flow function call to improve code readability and maintainability
2024-05-31 11:02:06 -07:00
ogabrielluiz
1f8d0eb1c0 chore: Update package versions in pyproject.toml files
The package versions in the pyproject.toml files for "langflow" and "langflow-base" have been updated. The version of "langflow" was changed from 1.0.0a42 to 1.0.0a43, and the version of "langflow-base" was changed from 0.0.53 to 0.0.54. This update ensures that the latest versions of the packages are being used in the codebase.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 14:35:07 -03:00
Mendon Kissling
1a569a4cb7
Update README.md (#2036)
For clarity in Python version.
2024-05-31 12:15:51 -04:00
Mendon Kissling
139a3f254f
Update README.md
For clarity in Python version.
2024-05-31 11:55:54 -04:00
ogabrielluiz
a3a09fed3b refactor: Fix serialize_datetime function in model.py 2024-05-31 11:41:17 -03:00
ogabrielluiz
031b82c665 refactor: Update serialize_datetime function in model.py 2024-05-31 11:25:36 -03:00
ogabrielluiz
82404d1ed9 refactor: Update serialize_datetime function in model.py
The serialize_datetime function in model.py has been updated to handle the "updated_at" and "created_at" fields. The function now converts datetime values to ISO 8601 format with timezone information. This change ensures consistent serialization of datetime values in the codebase.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 11:22:40 -03:00
ogabrielluiz
2cffd76135 feat: Update pre-commit configuration
The pre-commit configuration file `.pre-commit-config.yaml` was updated to remove the `pretty-format-json` hook and exclude `tsconfig.*.json` files. This change improves the formatting consistency of the codebase.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-30 19:13:15 -03:00
Gabriel Luiz Freitas Almeida
67207eb171
Fix endpoint URL interpolation issue in getCurlCode (#2026)
* chore: Update getCurlCode to fix endpoint URL interpolation issue
2024-05-30 13:18:56 -07:00