remove_step
remove_step
Remove a step from this context entirely.
Parameters
name
Name of the step to remove.
Returns
Context — Self for method chaining.
remove_step
Remove a step from this context entirely.
Name of the step to remove.
Context — Self for method chaining.
1 from signalwire import AgentBase 2 3 agent = AgentBase(name="my-agent", route="/agent") 4 5 contexts = agent.define_contexts() 6 ctx = contexts.add_context("default") 7 ctx.add_step("greet").set_text("Greet the caller.") 8 ctx.add_step("obsolete_step").set_text("This step is no longer needed.") 9 ctx.add_step("farewell").set_text("Thank the caller and say goodbye.") 10 11 ctx.remove_step("obsolete_step") 12 13 agent.serve()