Skip to navigation

opener

View as MarkdownOpen in Claude

Return how the agent opens a request when it takes it up: the opener for the request’s kind with {about} replaced, or what the request is about when its kind has no opener.

Parameters

request
Mapping[str, str]Required

A request, as {"kind": ..., "about": ...}.

Returns

str — The opening words.

Example

from signalwire.patterns import RequestList
later = RequestList("later", openers={"question": "You had a question: {about}."})
print(later.opener({"kind": "question", "about": "store hours"}))
# You had a question: store hours.