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>
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-24 12:39:49 -07:00 • committed by GitHub
commit 77e23d9442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 25 additions and 30 deletions

View file

@ -1,5 +1,3 @@
from langchain_core.documents import Document
from langflow.components import helpers
from langflow.custom.utils import build_custom_component_template
from langflow.schema import Data
@ -17,18 +15,18 @@ from langflow.schema import Data
# assert result.new_key == "new_value"
def test_document_to_data_component():
# Arrange
document_to_data_component = helpers.DocumentsToDataComponent()
# def test_document_to_data_component():
# # Arrange
# document_to_data_component = helpers.DocumentsToDataComponent()
# Act
# Replace with your actual test data
document = Document(page_content="key: value", metadata={"url": "https://example.com"})
result = document_to_data_component.build(document)
# # Act
# # Replace with your actual test data
# document = Document(page_content="key: value", metadata={"url": "https://example.com"})
# result = document_to_data_component.build(document)
# Assert
# Replace with your actual expected result
assert result == [Data(data={"text": "key: value", "url": "https://example.com"})]
# # Assert
# # Replace with your actual expected result
# assert result == [Data(data={"text": "key: value", "url": "https://example.com"})]
def test_uuid_generator_component():