set_prompt
set_prompt
Set the context’s prompt text directly. Cannot be used together with add_section()
or add_bullets().
Parameters
prompt
Plain-text prompt for this context.
Returns
Context — Self for method chaining.
set_prompt
Set the context’s prompt text directly. Cannot be used together with add_section()
or add_bullets().
Plain-text prompt for this context.
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.set_prompt("You are handling billing inquiries. Be concise and accurate.") 8 ctx.add_step("greet").set_text("Greet the caller and ask how you can help.") 9 10 agent.serve()