breadboard-ai / breadboard

A library for prototyping generative AI applications.
Apache License 2.0
205 stars 30 forks source link

Expressing async generators as bidirectional streams #134

Open dglazkov opened 1 year ago

dglazkov commented 1 year ago

One neat thing that fell out of the adventures in google/breadboard-ai#132 is that there might be a way to plumb the run of a board down to invoked boards using this trick:

This would allow the consumer of the top-level run see what's happening inside each board, proxy nodes, replace them, etc.

seefeldb commented 1 year ago

Not sure I follow.

Also, didn't you change proxy-ing nodes to something more implicit, i.e. nodes that themselves proxy using an ambient transport protocol, e.g. defined at the top-level (where that transport is known) as a runtime kit? Or is this what you meant?

FWIW, the other instructive scenario to consider is a server side process that needs to wait for a long time for some event (e.g. human approval step, new data coming in from somewhere, etc.) and should go to sleep in the meantime. Have that interrupt come from deep in the stack.