contexts.steps
An array of objects that define the steps in the context. These steps are used to define the flow of the conversation.
| Name | Type | Default | Description |
|---|---|---|---|
stepsRequired | object[] | - | An array of objects that accept the steps parameters. |
steps Parameters
The steps property accepts one of the following step types:
- Text Step
- POM Step
| Name | Type | Default | Description |
|---|---|---|---|
textRequired | string | - | The prompt or instructions given to the AI at this step. |
nameRequired | string | - | The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. |
endOptional | boolean | false | A boolean value that determines if the step is the last in the context. If true, the context ends after this step.Important: This cannot be used along with the valid_steps parameter. |
functionsOptional | string[] | - | An array of strings, where each string is the name of a [SWAIG.function][swaig.functions] that can be executed from this step. |
step_criteriaOptional | string | - | The criteria that must be met for the AI to proceed to the next step. The criteria is a instruction given to the AI. It's highly recommended you create a custom criteria for the step to get the intended behavior. |
skip_user_turnOptional | boolean | false | A boolean value, if set to true, will skip the user's turn to respond in the conversation and proceed to the next step. |
valid_contextsOptional | string[] | - | An array of context names that the AI can transition to from this step. This must be a valid contexts.name that is present in your contexts object. |
valid_stepsOptional | string[] | Proceeds to the next step. | An array of valid step names that the conversation can proceed to from this step. If the array is empty, or the valid_steps key is not present, the conversation will proceed to the next step in the context.Important: This cannot be used along with the end parameter. |
| Name | Type | Default | Description |
|---|---|---|---|
pomRequired | object[] | - | An array of POM (Prompt Object Model) sections that define structured prompt instructions for the AI at this step. |
nameRequired | string | - | The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. |
endOptional | boolean | false | A boolean value that determines if the step is the last in the context. If true, the context ends after this step.Important: This cannot be used along with the valid_steps parameter. |
functionsOptional | string[] | - | An array of strings, where each string is the name of a [SWAIG.function][swaig.functions] that can be executed from this step. |
step_criteriaOptional | string | - | The criteria that must be met for the AI to proceed to the next step. The criteria is a instruction given to the AI. It's highly recommended you create a custom criteria for the step to get the intended behavior. |
skip_user_turnOptional | boolean | false | A boolean value, if set to true, will skip the user's turn to respond in the conversation and proceed to the next step. |
valid_contextsOptional | string[] | - | An array of context names that the AI can transition to from this step. This must be a valid contexts.name that is present in your contexts object. |
valid_stepsOptional | string[] | Proceeds to the next step. | An array of valid step names that the conversation can proceed to from this step. If the array is empty, or the valid_steps key is not present, the conversation will proceed to the next step in the context.Important: This cannot be used along with the end parameter. |