Skip to content

Prompt Megastep

Dimitri Glazkov edited this page Apr 8, 2025 · 1 revision

This is a rough sketch of how we'll consolidate all existing generative steps (Make Text, Make Image, etc.) into a single "Prompt" step.

Currently, these are all distinct steps with their own types:

  • a2.bgl.json#[name]
  • go-over-list.bgl.json
  • etc.

The new "Prompt" step will combine them into one new step, with its own new type:

  • prompt.bgl.json

The new step will:

  • import a2.bgl.json as a framework
  • have an extra generative-mode configuration port that will allow selecting various generative modes (aka steps). The values of the generative-mode configuration port will map to the previously distinct steps:
    • "Generate Text" -> "Make Text" -> a2.bgl.json#daf082ca-c1aa-4aff-b2c8-abeb984ab66c
    • "Generate Image" -> "Make Image" -> ...
    • ...
  • while being edited, use the "Reactive" port capability (landed in #5259, see reactive-step.ts for an example) and switch the rest of configuration dynamically based on the mode, calling describe on the matching distinct step and inserting its properties inline.
  • when run, will read the value of the generative-mode port and call invoke on the matching distinct step

Mapping old steps to new steps

In BGL, the new Prompt step will have a new prompt.bgl.json type, and in configuration, the generative-mode property that will contain the old distinct step URL (filed #5260 to implement).

Clone this wiki locally