mystic-ai / pipeline

Pipeline is an open source python SDK for building AI/ML workflows
https://www.mystic.ai
Apache License 2.0
127 stars 22 forks source link

primitive dict Variable do strange things with default value #451

Closed ibaraki-douji closed 3 months ago

ibaraki-douji commented 5 months ago

When using a Variable of type dict, in the /play webui depending in the default value it does different things.

Using no default:

first_input = Variable(
        dict,
        title="first_input",
        description="An input",
    )

It produce : image

Using a simple default value:

first_input = Variable(
        dict,
        default={"my": "dict"}
        title="Input number",
        description="A basic input number to do things with",
    )

It produce : image

Using a complex default value:

input_var= Variable(
        dict,
        default={"my": "dict", "is": "big", "and": {"has": "nested", "values": "too"}, "also": {"another": "dict"}}
        title="Input number",
        description="A basic input number to do things with",
    )

It produce : image

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.