breadboard-ai / breadboard

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

[Inspector API] `runJavascript` has additional `inputSchema` and `outputSchema` ports #2437

Open paullewis opened 2 weeks ago

paullewis commented 2 weeks ago

Not sure if this is a bug or not, but I think it might be. As of https://github.com/breadboard-ai/breadboard/pull/2413 we now get three schemas coming through for a runJavascript node: schema, inputSchema, and outputSchema.

This generates some oddness on the front end:

Screenshot 2024-07-05 at 15 28 47

Which I'm currently working around with this:

https://github.com/breadboard-ai/breadboard/blob/main/packages/visual-editor/src/ui/elements/node-info/node-configuration.ts#L743 i.e., only allow a port-spec attached to "schema" otherwise ignore it.

@dglazkov, @aomarks – can one of you advise on what the correct behavior is here?

dglazkov commented 2 weeks ago

Ohh yeah, we need to reconcile this. My sense is that we probably should change the node details UI to treat a port with a port-spec as just another port (similar to the LLM Content) rather than its own section. WDYT?