1.2 KiB
1.2 KiB
Step
TODO: Better explain in one sentence what this is and what its purpose is
:::info A step is a simple action that the LLM should take as part of a sequence that collectively completes some task :::
Details
- A
Stepis a Pydantic class inheriting fromStep - Steps implement the
runmethod, which takes a ContinueSDK as its only parameter - The ContinueSDK gives all the utilities you need to easily write recipes (Steps)
- It also implements the
describemethod, which just computes a textual description of what happened when therunmethod was called - Can save attributes in
runif you want, or just have a defaultdescribe, or not even implement it, in which case the name of the class is used - Any parameters to a Step are defined as attributes to the class without a double leading underscore (those with this are private).
- Steps can be composed together
Step methods
run (required)
the code that should run when executed by the policy
description (optional)
the definition of what the step does in natural language
reverse (optional)
the code that should run when the step is reversed
modify (optional)
the code that should run when the step is rerun with feedback