render

View as MarkdownOpen in Claude

Build and render the complete SWML document as a JSON string. Delegates to SWMLService.render_document().

Returns

str — The SWML document serialized as JSON.

Example

1from signalwire import SWMLService, SWMLBuilder
2
3service = SWMLService(name="demo")
4builder = SWMLBuilder(service)
5
6json_str = builder.answer().ai(prompt_text="Hello").render()
7print(json_str)