breadboard-ai / breadboard

A library for prototyping generative AI applications.
Apache License 2.0
151 stars 21 forks source link

[core-kit] Rename unnest (probably) #2616

Open aomarks opened 1 month ago

aomarks commented 1 month ago

unnest is probably not the best name for this component. This component exposes all properties of the given JSON object as separate output ports (and propagates their schema from the incoming object's schema).

One thing to consider is that we should add the inverse operation too (take N input wires and create a JSON object out of them), and it would be good if its name fit well into a scheme with this one.

Options:

aomarks commented 1 month ago

Side comment: I was also playing around with icons to visualize what these components do. Thinking something like this (note these don't currently work well as 48px component icons):

image


image
dglazkov commented 1 month ago

Yeah, that sounds right, visually. We typically use the material design icons. I found the one for joiner there. One day, we'll have an actual graphics designer. For now, I'd stick to material design's accumulated wisdom.

aomarks commented 1 month ago

I found the one for joiner there.

👍

Speaking of, joiner overlaps a fair bit with terminology here. Another direction is to go for slightly longer names to avoid ambiguity.

E.g. these components could be something like splitJsonObject and createJsonObject. I wonder if joiner could be made more precise too.