Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/garrytrinder/msteams-dalle-2-image-generator-bot

A Microsoft Teams personal app which contains a bot that can be used to generate images from scratch based on a text prompt.
https://github.com/garrytrinder/msteams-dalle-2-image-generator-bot

dalle image-generator image-generator-using-openai-api microsoft-teams microsoft-teams-bot

Last synced: 25 days ago
JSON representation

A Microsoft Teams personal app which contains a bot that can be used to generate images from scratch based on a text prompt.

Awesome Lists containing this project

README

        

# DALL-E 2 Image Generator Bot for Microsoft Teams

This repository contains a Microsoft Teams personal app which contains a bot that can be used to generate images from scratch based on a text prompt.

The app has been built using Teams Toolkit for Visual Studio Code and uses the Open AI DALL-E 2 Image Generation API to generate images.

## Commands

The below table describes the commands available for use in the bot.

|   | Description | Command |
| --- | ------ | ---- |
| 🧑‍🎨 | Generate images using a detailed description | `generate ` |
| ❓ | Generate images from a randomly selected detailed description | `surprise` |
| 🕒 | View submission history | `history` |
| ⚙️ | Configure bot settings | `settings` |

## Concepts introduced

- Using `TeamsFxBotCommandHandler` class to respond to incoming messages from the chat
- Using `TeamsFxActionHandler` class to respond to Adaptive Card submissions
- Integrate `TeamsActivityHandler` class with a Teams Toolkit generated project
- Send a welcome message on install to start a first run experience
- Save to and retrieve data from conversation state using state accessors
- Use Azurite local emulation of Azure Blob Storage for persisting state
- Send typing indicator from the bot to the chat
- Add time delay when sending messages from the bot to the chat
- Add custom tasks to Teams Toolkit F5 debugging process

## Build

> Requires Teams Toolkit for Visual Studio Code and Microsoft 365 tenant

- Clone repository
- Open project in VS Code
- Start a debug session to provision resources on first run
- Add the following variables to `bot\src\.env.teamsfx.local`
- `BLOB_CONNECTION_STRING=UseDevelopmentStorage=true`
- `BLOB_CONTAINER_NAME=state`
- Stop and start debug session for variables to take effect