Closed markboots closed 3 years ago
In some rich messaging transports, it's possible for some text & media combinations to be sent in a single message, like an image with a caption for example.
I'm assuming it would be up to the transport layer to bundle these into a single API call in the example above?
I think I agree; the way to specify a text+media combination (like an image with caption) in the Flow design would be:
prompt
specifies one resource ID language_id: "47",
modes: ["rich_messaging"],
content_type: "text",
mime_type: "text/plain",
value: "Howdy! You've reached the Museum of Interoperability! This is a long message for you because we've gone beyond the limitations for 180 characters. I'm your guide, Florian. I hope you're excited for this two hour tour through the history of interoperable data systems."
},
{
language_id: "47",
modes: ["rich_messaging"],
content_type: "image",
mime_type: "image/png",
value: "https://your-server-somewhere.flowinteroperability.org/example-image.png"
}
(Historical context: This change to the Resource structure enables combos like image + caption in one resource; the initial resource concept would not have been able to contain both.)
Rationale:
We've encountered a need to have multiple pieces of media within a resource. These multiple pieces of media might provide different formats (ie: ContentTypes) for a single mode (e.g. rich_messaging).
There is also a need to specify different content for different modes,
The proposed upgrade to the Resource structure to support this is:
Example:
Structure:
Note: In the course of developing the open-source Flow Runner and Flow Builder implementations, the initial dev team proposed a list of cleanups and clarifications to the spec. This is one of a set of changes proposed to improve consistency, usability, and functionality of the spec based on the first complete build-outs.