Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.56k stars 226 forks source link

[Bug]: Code node coerces array inputs into a string #317

Open hotelbuddy-online opened 5 months ago

hotelbuddy-online commented 5 months ago

What happened?

when using code node, it seems to change the type of the input when it is an array. a workaround is to convert into an object which is an array, but this seems irregular

What was the expected functionality?

the input node should have same data type as what goes into it.

Describe your environment

MacOS, Node 14.0.0, etc.

Relevant log output

No response

Relevant screenshots

No response

Code of Conduct

abrenneke commented 5 months ago

@hotelbuddy-online could you give more info about the input you're providing to the code node? It doesn't intentionally change the input type to anything in particular (no coercion), can you provide a minimal reproduction?