Commit graph

573 commits

Author SHA1 Message Date
Carlos Coelho
146ef8c8cd
Improve makefile (#2338)
* Update Makefile to use command substitution for killing process

* break long lines into shorter ones

* replace fixed values with variables

* correct the unit test coverage report

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-06-25 15:52:41 -07:00
Gabriel Luiz Freitas Almeida
4365e3d2d8 chore: Update package versions in pyproject.toml files 2024-06-25 15:31:29 -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
af98504e4a
Fix Astra Component and Middleware (#2321)
* 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

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
2024-06-24 13:29:41 -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
75dbf1b39d chore: update package versions in pyproject.toml files 2024-06-24 07:41:40 -07:00
Gabriel Luiz Freitas Almeida
24d9e86885 chore: update package versions in pyproject.toml files 2024-06-24 10:19:17 -03:00
Gabriel Luiz Freitas Almeida
0f5810928d chore: Update package versions in pyproject.toml files 2024-06-23 18:35:21 -07:00
berrytern
795a2bd3df <feat>: add Redis dependency 2024-06-22 08:56:54 -07:00
Gabriel Luiz Freitas Almeida
4175fc13f6 🔧 (Makefile): add 'update' target to run 'poetry update' command for updating dependencies
🔧 (pyproject.toml): update version to "1.0.0rc0" for the 'langflow' package
🔧 (pyproject.toml): update version to "0.0.73" for the 'langflow-base' package
🔧 (pyproject.toml): remove 'python-socketio' dependency and update other dependencies to specific versions
2024-06-21 21:49:22 -07:00
ming luo
1bf668a941 kubernetes secret manager 2024-06-21 20:55:42 -07:00
Gabriel Luiz Freitas Almeida
de0657acf3 refactor: Update langchain-mongodb package to version 0.1.6 2024-06-20 18:09:32 -03:00
Gabriel Luiz Freitas Almeida
2b1d46e883 refactor: Update langchain-aws dependency to version 0.1.6 2024-06-19 20:01:04 -03:00
ogabrielluiz
b3de990beb refactor: Update langchain-astradb dependency to version 0.3.3
This commit updates the langchain-astradb dependency in the pyproject.toml file to version 0.3.3. This update ensures compatibility with the latest features and improvements in langchain-astradb.
2024-06-19 01:06:52 -03:00
ogabrielluiz
584cd59961 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-18 14:51:19 -03:00
ogabrielluiz
45c2f8a9b6 chore: Update langchain-core and langflow-base versions to 0.2.8 and 0.0.72 respectively 2024-06-17 21:14:54 -03:00
ogabrielluiz
277f0dd50d chore: Update package versions in pyproject.toml files 2024-06-17 18:51:07 -03:00
cristhianzl
1c1418596a fixing poetry lock versions 2024-06-17 16:27:45 -03:00
Lucas Oliveira
f33c73a3ad Fixed Prettier tailwind formatting 2024-06-17 14:37:23 -03:00
cristhianzl
fcf4512210 merge dev into two_edges 2024-06-17 10:01:28 -03:00
ogabrielluiz
40cebd1bcf chore: Update package versions to latest in pyproject.toml files 2024-06-15 11:09:16 -03:00
ogabrielluiz
47ea958441 chore: Update package versions in pyproject.toml files 2024-06-14 22:46:57 -03:00
italojohnny
2d692a6701 Merge branch 'dev' into two_edges_dev 2024-06-14 09:31:14 -03:00
ogabrielluiz
38c721f387 chore: Bump version of langflow and langflow-base packages 2024-06-14 08:39:42 -03:00
ogabrielluiz
d921865e45 chore: Update dependencies to latest versions 2024-06-13 18:33:48 -03:00
italojohnny
f0630ec870 Merge branch 'dev' into two_edges_dev 2024-06-13 15:58:33 -03:00
ogabrielluiz
8fef4b2d3a chore: Update langflow-base and langflow package versions to 0.0.66 and 1.0.0a55 respectively 2024-06-13 11:30:20 -03:00
ogabrielluiz
e98e3f5387 chore: Update package versions in pyproject.toml files 2024-06-13 01:08:28 -03:00
ogabrielluiz
e3d2b9ff28 chore: Update package versions in pyproject.toml and poetry.lock 2024-06-12 12:26:36 -03:00
Lucas Oliveira
850de6b952 Merge branch 'dev' into two_edges_merge 2024-06-11 18:11:13 -03:00
ogabrielluiz
f7b1040562 chore: Update package versions in pyproject.toml and poetry.lock 2024-06-11 15:55:14 -03:00
ogabrielluiz
2b2812f4df Merge remote-tracking branch 'origin/dev' into cz/mergeAll 2024-06-11 12:49:47 -03:00
Lucas Oliveira
4cf5f3ae0f Merge remote-tracking branch 'origin/dev' into cz/mergeAll 2024-06-11 12:46:51 -03:00
ogabrielluiz
89faa251ef chore: Update package versions in pyproject.toml and poetry.lock 2024-06-11 12:43:44 -03:00
italojohnny
b7beeedccd update cassio dependency to be optional with extras 2024-06-11 11:50:17 -03:00
ogabrielluiz
0014d8e50a Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-11 09:52:41 -03:00
Gabriel Luiz Freitas Almeida
e28962cbc4
Update Couchbase component and package versions (#2138)
* feat: Update Couchbase component to handle import errors

* chore: Update package versions in pyproject.toml and poetry.lock

* refactor: Fix encoding issue in read_text_file function

* 🐛 (parse.py): fix issue where method was always set to "post" when data or data binary was provided in curl command

* refactor: Fix string formatting in MonitorService delete_messages method

* fix: Update Couchbase import instructions in CouchbaseComponent

* refactor: Fix encoding issue in read_text_file function
2024-06-11 05:33:23 -07:00
cristhianzl
34626f0531 merge dev 2024-06-11 09:12:52 -03:00
ogabrielluiz
6d51386b83 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-10 21:07:02 -03:00
Jordan Frazier
11ef216c0a
feat: add cassandra components (#2056)
* Add cassandra store component

* Add cassandra search component

* revert poetry changes

* fix type

* Add cassandra icon

* Add Cassandra Message Writer

* Add cassandra message reader

* poetry

* Fix init of cass reader

* move cassio import to base project and inline imports in backend

* running make format

* remove file

* remove cassio import

* update lockfile

* Actually update lockfile:

* merge fixes
2024-06-10 15:04:24 -07:00
ogabrielluiz
735a7e3780 Merge cz/mergeAll to two_edges 2024-06-10 11:31:02 -03:00
Gabriel Luiz Freitas Almeida
dbe81880ed
feat: add unstructured package version to 0.14.4 and add support for docx, md, and pptx extras (#2105) 2024-06-10 04:36:56 -07:00
Gabriel Luiz Freitas Almeida
df57570852
refactor: migrate from Record to Message (#2113)
* chore: Update launch.json to use debugpy instead of python for debugging

* refactor: Update import statements for Record in langflow components

* feat: Add image handling functionality to langflow schema

* update projects

* 📝 (constants.py): Add 'output_types' to NODE_FORMAT_ATTRIBUTES for consistency and completeness

♻️ (setup.py): Refactor imports to improve readability and maintainability
♻️ (setup.py): Update code to remove fields that are not in the latest template for consistency

* refactor: Update schema from Record to Message

* refactor: Remove print statement in MonitorService

* refactor: Remove fields not in the latest template for consistency

* refactor: Update code to handle Record objects in utils.py

* update projects

* 📝 (monitor.py): Add type hint for message_id parameter in update_message function
📝 (parse.py): Rename ParsedContext to ParsedArgs for clarity
📝 (chat.py): Remove unused imports and methods in ChatComponent class
📝 (StoreMessage.py): Change return type of store_message method from list[Record] to list[Message]
📝 (base.py): Change type hint from Dict[str, str | list[str]] to Mapping[str, str | list[str]] in update_raw_params method
📝 (loading.py): Add condition to check if raw is not None before accessing its attributes in instantiate_custom_component function
📝 (memory.py): Change return type of get_messages function from list[Record] to list[Message]
📝 (memory.py): Change parameter type of add_messages function from Message to Message | list[Message]
📝 (image.py): Add type hint for image_prompt_value variable in Message class

🐛 (record.py): fix type hint for image_prompt_value variable to ImagePromptValue to improve code clarity and maintainability

* chore: Add orjson options for serialization

* chore: Update orjson options for serialization in setup.py

* chore: Update input_value options for models

This commit updates the input_value options for the models in the `OpenAIModel.py`, `MistralModel.py`, `CohereModel.py`, `VertexAiModel.py`, `ChatLiteLLMModel.py`, `OllamaModel.py`, `HuggingFaceModel.py`, `AnthropicModel.py`, and `AmazonBedrockModel.py` files. The `input_value` now supports the additional input type "Prompt". This change allows for more flexibility in the input data that can be provided to the models.

Fixes #<issue_number>

* chore: Update edges with latest component versions

This commit updates the edges in the project data with the latest component versions. It ensures that the source and target nodes are correctly updated based on their corresponding nodes in the project. The commit also includes escaping of JSON dumps for the source and target handles in the edges.

* 📝 (utils.py): Remove unnecessary async keyword from dict_values_to_string function to improve code readability and consistency
🔧 (utils.py): Simplify handling of Message objects by directly accessing the text property instead of calling to_lc_message() method

* chore: Refactor PromptComponent to use updated Prompt class and remove unused imports

* feat: Add support for image files in Message model

This commit modifies the Message model to support image files as attachments. It introduces the `is_image_file` function to check if a file is an image, and the `to_content_dict` method in the Image class to convert the image object to a content dictionary. Additionally, the `get_file_content_dicts` method is added to generate content dictionaries for all files in the message, including images. This enhancement improves the handling of image attachments in the messaging system.

Fixes #<issue_number>

* update projects and lock

* chore: Update LCModelComponent to use Prompt instead of Record

* refactor: Update artifact type to include message in utils.py

* fix: Add check for input_value to only pass if string

*  (switchOutputView/index.tsx): introduce constant RECORD_TYPES to store valid record types for better readability and maintainability
🔧 (switchOutputView/index.tsx): refactor switch cases to use RECORD_TYPES constant for checking valid record types and simplify the logic for handling different types of result messages

* feat: Enable loading from database for openai_api_key field in Langflow starter projects

This commit updates the Langflow starter projects by enabling the loading of the `openai_api_key` field from the database. Previously, the field was not being loaded from the database, but now it will be loaded and used in the projects. This change improves the functionality and flexibility of the projects.

Fixes #<issue_number>

* ♻️ (constants.py): remove unnecessary import statement and clean up code formatting in ORJSON_OPTIONS constant definition

* refactor: Update MemoryComponent to use messages instead of records

This commit updates the MemoryComponent class in the langflow/components/helpers/MemoryComponent.py file to use the term "messages" instead of "records" for better clarity and consistency. It also updates the get_messages method to return a list of Message objects instead of Record objects. This change improves the naming and readability of the code.

* refactor: Update Message model to include timestamp conversion function

This commit updates the Message model in the langflow/schema/message.py file to include a new function `_timestamp_to_str` that converts the timestamp to a string format. This function is used as a BeforeValidator for the `timestamp` field, ensuring that it is always formatted correctly. This change improves the consistency and reliability of the timestamp handling in the messaging system.

* refactor: Update test_data_components.py to improve directory component loading

This commit updates the test_data_components.py file to improve the loading of the directory component. It ensures that the directory component can load mdx files from the ../docs/docs/components directory. This change enhances the functionality and reliability of the directory component.

Fixes #<issue_number>

* refactor: Update .gitattributes to specify working-tree-encoding for .mdx and .json files

This commit updates the .gitattributes file to specify the working-tree-encoding for .mdx and .json files. It sets the encoding to UTF-8 for both file types, ensuring consistent handling of character encoding. This change improves the reliability and compatibility of the repository.

Fixes #<issue_number>

* fix: 🐛 corrects encoding error

* refactor: Update toolkits.mdx to improve documentation and fix formatting

* refactor: Add dictdiffer library as a dependency

This commit adds the dictdiffer library as a dependency in the poetry.lock file. The dictdiffer library is a useful tool for diffing and patching dictionaries. It will enhance the functionality and flexibility of the project.
2024-06-09 18:00:48 -07:00
ogabrielluiz
982c33b476 chore: Update package versions in pyproject.toml files 2024-06-07 16:32:37 -03:00
ogabrielluiz
4c87f7662c Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-07 10:42:22 -03:00
ogabrielluiz
bc86fde139 chore: Update package versions in pyproject.toml files 2024-06-07 08:39:50 -03:00
cristhianzl
02cca793eb merging all branches/feat 2024-06-06 21:43:59 -03:00
ogabrielluiz
c3a0e3d598 chore: Upgrade langflow-base package version from 0.0.58 to 0.0.59 2024-06-06 18:57:40 -03:00
ogabrielluiz
bb02397a60 ⬆️ (pyproject.toml): upgrade package version from 1.0.0a46 to 1.0.0a47 2024-06-06 18:34:03 -03:00
ogabrielluiz
878c5a7686 chore: Update langchain-cohere dependency to version 0.1.5 2024-06-06 17:30:28 -03:00