image: ./flos-flowers-2-logo.webp # 💐 Flos Flowers 2.0 #### SignalWires AI Agent Meets OpenAIs DALL·E 3 This SignalWire AI flower sending bot sends an eCard image (MMS/SMS) along with a text message. The Flos Flowers 2.0 uses SignalWires AI Gateway (SWAIG) and the creative power of OpenAIs DALL-E 3 to send personalized virtual flowers.
On this page, youll find a full breakdown of the prompts used, along with all the functions. To quickly access all relevant files, please visit the [GitHub repository](https://github.com/signalwire/digital_employees/tree/main/server/Perl_Examples/FlosFlowers2). :::tip **Try it out!** Dial +1 (660) 835-6937 to request flowers of your choice sent by SMS. :::
GitHub Repository
View the project and clone it to your development environment.
:::info This is version 2.0 of Flos Flowers, which requires a server and is rated Moderate difficulty. [Version 1.0](/page/tadhack-2024/serverless/virtual-flowers-demo) showcases a more approachable, Low-Code version of Flos Flowers. ::: ## How it works The **Flos Flowers 2.0** demo has 3 primary interfaces: - The **AI agent**, made available by phone call on the PSTN by SignalWire - A **public website** showing live flower request details and the generated DALL·E images - **SMS and MMS messages** delivered to the user with the generated images and confirmation details ## Build it In addition to what is included in the [**GitHub repository**](https://github.com/signalwire/digital_employees/tree/main/server/Perl_Examples/FlosFlowers2), you will also need to set up the following components. - **Web server:** NGINX - **Database:** For this example, well be using PostgreSQL to store records about flower requests - **Active SignalWire Space:** Accessed at yourspace.signalwire.com - **Signalwire API token** - **A registered/apporoved campaign for SMS** in your SignalWire Space - **OpenAI API Key** for DALL-E 3 image generation :::info SMS is subject to additional regulation by carriers. If you havent worked with SMS before, check out our comprehensive guide to [navigating the Campaign Registry process](https://developer.signalwire.com/guides/campaign-registry-all-you-need-to-know/). ::: ### Function reference See the below table to learn more about the necessary functions and arguments for the demo application, and how they contribute to overall functionality. | Function | Arguments | Description | | :- | :- | :- | | send_flowers | to, from, flower_type, message | Utilizes SWAIG for sending virtual flowers with a personalized message. | #### The send_flowers function The send_flowers function is central to the Flos Flowers 2.0 demo. This function utilizes **SWAIG** (the **S**ignal**W**ire **AI** **G**ateway) to connect your SignalWire configuration to OpenAI and DALL·E. This table represents the arguments required by the send_flowers function to execute its task. | Argument | Type | Description | | :-- | :-- | :- | | to | String | The phone number of the recipient. This must include the country code to ensure the message is correctly routed to the intended party. | | from | String | The phone number associated with the SignalWire account sending the virtual flowers. This number acts as the sender ID in the message. | | flowertype | String | Specify the type of flowers to be generated by the DALL-E 3 model. Get creative! | | message | String | A personalized message to accompany the virtual flower image. | The send_flowers function leverages both SignalWires messaging capabilities and the innovative image generation of OpenAIs DALL-E 3 to create and send a unique virtual flower arrangement with a customized message. ### SWML Video Walkthrough *Coming soon!* {/* Check out this video walkthrough of the SWML script: */} ## Use case Flos Flowers 2.0 showcases the potential of integrating AI for personalized and creative digital communications, transforming traditional gifting into an interactive and memorable experience. ## GitHub Check out the full project repository for the Flos Flowers demo on GitHub. - [View the project on GitHub](https://github.com/signalwire/digital_employees/tree/main/server/Perl_Examples/FlosFlowers2) - [Report an issue with a demo](https://github.com/signalwire/digital_employees/issues) ## SignalWire SignalWire’s AI Agent for Voice allows you to build and deploy your own digital employee. Powered by advanced natural language processing (NLP) capabilities, your digital employee will understand caller intent, retain context, and generally behave in a way that feels “human-like”. In fact, you may find that it behaves exactly like your best employee, elevating the customer experience through efficient, intelligent, and personalized interactions. ##### Made with ❤️ by SignalWires DevEx team *Have feedback on this site? Drop us a line at devex@signalwire.com or visit the [Community Slack](https://signalwire-community.slack.com/).*