icyavocado / Rocket.Chat.OpenAI.Completions.App

Rocket.Chat OpenAI ChatGPT Integration App
3 stars 3 forks source link

Add support for DALLE AI image generation #1

Open icyavocado opened 1 year ago

icyavocado commented 1 year ago

Proposal

Integrate DALL-E to command /dalle prompt

  1. Add DALL·E API request, and
  2. Trigger the bot using /dalle 'prompt' command (example: dalle a dog with sun glasses)
  3. Various settings should be available:
    • Multiple images support, preview before posting support (same layout as /giphy UI)
    • Togglable command /dalle
    • Able to pass n (how many images) and size (the size of the image) to the prompt

Expected outcome

An option to enable/disable the command /dalle.

icyavocado commented 1 year ago

Add command /dalle to the app: a1db263532dc524b47b9c510f43f4a4d70c27a1d

icyavocado commented 1 year ago

Using ISlashCommandPreviewItem and SlashCommandPreviewItemType to preview dalle image before sending out. Similar to how giphy app is doing their preview section.

import { ISlashCommandPreviewItem, SlashCommandPreviewItemType } from '@rocket.chat/apps-engine/definition/slashcommands';