Skip to content

Feat/subworkflows#29

Merged
JeanKaddour merged 30 commits intomainfrom
feat/subworkflows
Nov 29, 2024
Merged

Feat/subworkflows#29
JeanKaddour merged 30 commits intomainfrom
feat/subworkflows

Conversation

@srijanpatel
Copy link
Copy Markdown
Collaborator

@srijanpatel srijanpatel commented Nov 29, 2024

Summary of Changes

  • add JSON category of nodes
  • base subworkflow node
  • static subworkflow node - to be used when an existing workflow needs to be imported, all runs and tasks are recorded
  • ephemeral subworkflow node - currently used as a base for generative subworkflows, no runs and tasks are recorded
  • introduce "OutputNode" analogous to InputNode, but optional. This is handy in subworkflows, as it simplifies output schema
  • best of n node migrated to use a generated ephemeral subworkflow
  • change task model and run status api response schema
  • minor refactoring to support above
  • frontend change to render handles of fixed schema nodes


"""

_SUPPORTED_NODE_TYPES = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, let's finally get rid of this!

output_schema: Dict[str, str] = Field(default={"response": "str"})


class BestOfNNode(EphemeralSubworkflowNode):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also consider using Temporary instead of Ephemeral for simplicity

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While, other workflows are persisted in the DB, these ones are created at runtime and not stored anywhere.
I think "ephemeral" is a more apt term (and popular in software too) for such things, that are transient/not persistent.

@JeanKaddour JeanKaddour merged commit d53b6d3 into main Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants