graph TD
A[Start] --> B[Initialize endStatePrompt and currentContext]
B --> C[Set endStateReached to false and initialize proposedViaRecheck]
C --> D{endStateReached?}
D -->|No| E[Call proposeNextStep]
E --> F[Call recheckProposedStep]
F --> G{recheck != nextStep and proposedViaRecheck.length > 3?}
G -->|Yes| H[Throw Error: Too many rejections, aborting workflow]
G -->|No| I{recheck != nextStep?}
I -->|Yes| J[Add recheck to proposedViaRecheck]
J -->|Yes| D
I -->|No| K{nextStep 'type' == 'end'?}
K -->|Yes| L[Set endStateReached to true]
L --> M[Return JamixAIWorkflowOutput with currentContext]
K -->|No| N[Call runStep]
N --> O[Update currentContext with resultContext]
O --> P[Reset proposedViaRecheck]
P --> D
D -->|Yes| Q[End]
style A fill:#f9f,stroke:#333,stroke-width:4px
style Q fill:#f9f,stroke:#333,stroke-width:4px
Created
January 16, 2025 00:54
-
-
Save noxasaxon/89028fbd7e51371ed2d1975a3ea3bd1d to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment