Commit graph

539 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
69f7a9a159 refactor: Remove unused imports and test adding messages 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
c1df05f295 refactor: Add test for adding messages 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
115f6fbb11 test: add messages tests 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
fff4537b1e
Fixes CLI and server (#2342)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

* chore: Fix missing parentheses in RequestCancelledMiddleware

* chore: Update pydantic-settings and tenacity versions

The commit updates the versions of the `pydantic-settings` and `tenacity` packages in the `poetry.lock` file. The `pydantic-settings` version is updated from 2.3.3 to 2.3.4, and the `tenacity` version is updated from 8.4.1 to 8.4.2.

* Update README.md

Add 1.0 banner

* fix fetch data to work even with autologin true

* format code

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Fix .env values not being honored in CLI (#2336)

* chore: Update launch.json to include environment file

The launch.json file was updated to include the environment file path for the "run" command in the "Python: Flask" configuration. This change ensures that the necessary environment variables are loaded when running the backend base of Langflow frontend. The previous configuration had the environment variables set in the "env" field, but it has been removed as it is redundant with the new environment file inclusion.

* chore: Update dotenv import and environment variable handling

This commit updates the import statement for the `dotenv` module in the `__main__.py` file. It adds the `dotenv_values` function to the import statement to enable loading environment variables from a file. Additionally, it introduces a new section of code that maps environment variables to their corresponding variables and types, allowing for more flexible and dynamic configuration. The commit also updates the `run` function to update variables based on environment variables, if they are present. This change improves the handling of environment variables and enhances the configurability of the application.

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>

* Update GitHub Actions workflows and dependencies (#2341)

* chore: Add GitHub Actions workflow for testing documentation build

* Fix server start command in GitHub Actions workflows

* chore: Bump langflow and langflow-base versions

* chore: Update GitHub Actions workflow for docs_test

* chore: Update typing import in __main__.py

* Fix user authentication and authorization issues (#2343)

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2024-06-25 09:20:55 -07:00
Gabriel Luiz Freitas Almeida
d85657f214
Refactor "created_at" column type for consistency and fix cancel middleware (#2316) (#2320)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
2024-06-24 13:15:54 -07:00
Gabriel Luiz Freitas Almeida
0268c7c0dd refactor: remove unused tests 2024-06-24 05:42:46 -07:00
Gabriel Luiz Freitas Almeida
61c34915a9 refactor: update dict to model_dump 2024-06-23 18:35:21 -07:00
Gabriel Luiz Freitas Almeida
93a2164543 refactor: rename TextInput to MessageTextInput 2024-06-23 15:24:11 -07:00
Gabriel Luiz Freitas Almeida
8d25605de4 chore: Build vector store in test_astra_setup 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
6e88eab7f5 chore: Remove unused vector search component and update vector store parameters format 2024-06-22 12:32:54 -07:00
ming luo
20f7c6757f mock kube-config 2024-06-21 20:55:42 -07:00
ming luo
17adc8b5a5 fix unit test 2024-06-21 20:55:42 -07:00
ming luo
1bf668a941 kubernetes secret manager 2024-06-21 20:55:42 -07:00
Gabriel Luiz Freitas Almeida
cad13f17c3 refactor: Update test_data_components.py to assert file_dict instead of result.text in test_directory_without_mocks 2024-06-21 15:46:17 -03:00
Gabriel Luiz Freitas Almeida
2e1bc10661 refactor: Update WebhookComponent to use MultilineInput for data field 2024-06-20 21:27:38 -03:00
Gabriel Luiz Freitas Almeida
29759f2c3e refactor: Rename test_record.py to test_data_class.py and update imports and references accordingly 2024-06-20 21:27:37 -03:00
Gabriel Luiz Freitas Almeida
b7154f470a fix path to data folder 2024-06-20 19:08:40 -03:00
Gabriel Luiz Freitas Almeida
47c0522c7b Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-20 13:41:00 -03:00
Nicolò Boschi
e3656a6a43
fix: "Flow" object has no field "last_tested_version" when loading flows from dir (#2221) 2024-06-19 18:15:50 +02:00
Nicolò Boschi
51c1aa1ec8 fix: graph process should raise the actual error when failing 2024-06-19 08:46:09 -07:00
Nicolò Boschi
e45737aaaa fix: graph process should raise the actual error when failing 2024-06-19 08:46:09 -07:00
Nicolò Boschi
818dfa7c6d
ci: skip test run_flow_from_json_object (#2227)
ci: skip test test_run_flow_from_json_object
2024-06-19 11:11:59 -04:00
Nicolò Boschi
6e49a2ec3b
fix test: test_data_components.test_directory_without_mocks (#2223) 2024-06-19 08:41:51 -04:00
ogabrielluiz
be88c25dac Add io module for easier access to Inputs and Outputs 2024-06-19 01:22:59 -03:00
ogabrielluiz
b475e51c51 refactor: Update AstraDBMessageWriterComponent to use AstraVectorStoreComponent
This commit updates the AstraDBMessageWriterComponent class in the AstraDBMessageWriter.py file to use the AstraVectorStoreComponent for vector storage. By making this change, we ensure consistency and improve code organization. This update aligns with recent changes in the AstraDBVectorStoreComponent and promotes code reuse.
2024-06-19 01:07:05 -03:00
ogabrielluiz
74af14b373 refactor: Update docs_path in test_data_components.py to fix directory path
The code changes in test_data_components.py update the `docs_path` variable to fix the directory path for loading components. The previous path was incorrect, and this update ensures that the correct path is used. This refactor improves the accuracy and reliability of the code.
2024-06-18 22:42:14 -03:00
ogabrielluiz
412a793a4c refactor: Update DocumentsToDataComponent class name in test_helper_components.py
The code changes in test_helper_components.py update the class name from DocumentToDataComponent to DocumentsToDataComponent. This refactor improves the clarity and consistency of the code.
2024-06-18 22:42:06 -03:00
ogabrielluiz
ca95e66b88 (test_custom_component.py): update test_custom_component_get_function_entrypoint_args to reflect correct number of arguments in build method
📝 (test_custom_component.py): reorganize import statements for better readability and consistency
♻️ (test_custom_component.py): refactor build method in YourComponent class to simplify and improve code readability
2024-06-18 22:41:57 -03:00
ogabrielluiz
98e3f4bdaa refactor: Update langflow custom components to use specific input classes
The code changes update the langflow custom components to use specific input classes, such as IntInput and TextInput, instead of the generic field types. This refactor improves the clarity and type safety of the code.
2024-06-18 22:41:10 -03:00
ogabrielluiz
df04a329cc Update webhook test case 2024-06-18 22:17:35 -03:00
ogabrielluiz
d07ee5964f refactor: Update data folder path in conftest.py 2024-06-18 19:03:48 -03:00
ogabrielluiz
c3a45b856b move data folder back 2024-06-18 18:47:04 -03:00
ogabrielluiz
584cd59961 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-18 14:51:19 -03:00
ogabrielluiz
c43d62cbd2 move data folder 2024-06-18 00:20:12 -03:00
ming
696e620468
fix path to the unit test data folder (#2201) 2024-06-17 16:34:52 -04:00
ogabrielluiz
88754b9cf3 Refactor build_template_from_class function to remove unused code and improve readability 2024-06-17 10:55:50 -03:00
cristhianzl
fcf4512210 merge dev into two_edges 2024-06-17 10:01:28 -03:00
Igor Carvalho
30eacad94a
General fixes related to shortcuts icons (#2179)
* Fix: center command icon for macOS

* Fix: Add visual shortcut to undo and redo

* code format

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-06-17 09:16:53 -03:00
Jordan Frazier
ca660cf8df
test: add astra integration test (#2189)
* add first astra integ test framework

* use fixtures

* remove old tests from merge

* Add correct sender type

* chore: Update unit test command in GitHub workflow

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-06-15 19:50:38 -07:00
Gabriel Luiz Freitas Almeida
c53901f7ef
Refactor endpoints.py to improve code handling and remove caching (#2180)
* chore: Refactor CustomComponent to improve repr_value handling

* ♻️ (endpoints.py): Refactor the simplified_run_flow and webhook_run_flow functions to remove caching

* Refactor endpoints.py to remove caching and update tests
2024-06-14 18:39:44 -07:00
ogabrielluiz
1dbeec38c0 refactor: Import Data class in utils.py for better code organization 2024-06-14 16:31:47 -03:00
ogabrielluiz
d060d5308a Add webhook test and fix webhook to support endpoint name 2024-06-14 16:30:17 -03:00
ogabrielluiz
d11877aa99 refactor: Add Webhook Test flow fixture 2024-06-14 15:33:48 -03:00
italojohnny
2d692a6701 Merge branch 'dev' into two_edges_dev 2024-06-14 09:31:14 -03:00
Gabriel Luiz Freitas Almeida
5300b9cc08
Improve error handling and logging in get_current_user_by_jwt function (#2165)
chore: Improve error handling and logging in get_current_user_by_jwt function
2024-06-14 04:24:52 -07:00
Gabriel Luiz Freitas Almeida
34b6153fed
chore: Update persist_directory parameter to handle None value in ChromaSearch and Chroma components (#2157)
* chore: Update persist_directory parameter to handle None value in ChromaSearch and Chroma components

* 🐛 (test_endpoints.py): fix assertion to check for correct key name in output results for chat and any input types
2024-06-13 06:52:32 -07:00
ogabrielluiz
909501e212 refactor: Update langflow components and constants
Update langflow components and constants to improve functionality, error handling, and user experience. This includes fixing rendering issues in dropdownComponent and improving value handling in tableNodeCellRender. The MonitorService now supports read-only mode in the exec_query method. The APIRequestComponent has been enhanced to parse curl commands and update the build configuration accordingly. The URLComponent now includes metadata in the returned data objects. Additionally, the SessionView and MessagesPage components have been updated to sort columns using the messagesSorter utility function, ensuring consistent column ordering. The unused Tabs component has been removed from FlowLogsModal. The CHAT_FIRST_INITIAL_TEXT and CHAT_SECOND_INITIAL_TEXT constants have been updated. Lastly, the error message in the Vertex class of base.py has been improved for building Components. These changes enhance the overall performance, functionality, and clarity of the codebase.
2024-06-13 10:40:39 -03:00
ogabrielluiz
16089ea5b2 Another batch of renaming Record to Data 2024-06-12 18:18:03 -03:00
ogabrielluiz
1d0056f4fc rename Record to Data 2024-06-12 17:59:32 -03:00
ogabrielluiz
e5fe8be38e refactor: Refactor type processing logic, move type extraction functions, and update import statements
Refactor the type processing logic in base.py to use the newly created post_process_type function for better readability and maintainability. Move the type extraction functions from custom_component.py to the type_extraction module for better organization and separation of concerns. Update import statements in utils.py to reflect the move of type extraction functions. Add functions to type_extraction.py to extract inner types and union types from generic aliases for type extraction operations.
2024-06-12 10:45:16 -03:00