fix: url component output types and id generator component (#3740)

* Updated URL component to include text

* Update starter project

* Updated ID Generator with the new component specification

* [autofix.ci] apply automated fixes

* Fixed type errors

* updated tests

* [autofix.ci] apply automated fixes

* Fixed tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Lucas Oliveira 2024-09-10 09:33:08 -03:00 • committed by GitHub
commit 0088b46aac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 50 additions and 21 deletions

View file

@ -1,6 +1,7 @@
from langflow.components import helpers
from langflow.custom.utils import build_custom_component_template
from langflow.schema import Data
from langflow.schema.message import Message
import pytest
@ -47,13 +48,12 @@ def test_uuid_generator_component():
build_config = frontend_node.get("template")
field_name = "unique_id"
build_config = uuid_generator_component.update_build_config(build_config, None, field_name)
unique_id = build_config["unique_id"]["value"]
result = uuid_generator_component.build(unique_id)
result = uuid_generator_component.generate_id()
# Assert
# UUID should be a string of length 36
assert isinstance(result, str)
assert len(result) == 36
assert isinstance(result, Message)
assert len(result.text) == 36
def test_data_as_text_component():