end

View as MarkdownOpen in Claude

End the conversation and start post-processing: the summary, and a request to your post_prompt_url when your SWML sets one. The webhook is not instant, so expect seconds.

To remove a conversation without any of that, use delete().

Parameters

conversation_id
strRequired

The conversation to end.

Returns

boolTrue when the service reported the conversation ended, False when no conversation had that id.

Example

import asyncio
from signalwire.ai_chat import AIChatClient
CONFIG_URL = "https://bayview-taxi.example.com/swml"
async def main():
async with AIChatClient(space="your-space") as client:
await client.create_conversation("chat-8f21", config_url=CONFIG_URL)
await client.chat("chat-8f21", "Book the van, please.")
await client.end("chat-8f21")
asyncio.run(main())

The AI post-prompt callback documents what your post_prompt_url receives.