This repository provides a DALL·E 2 Collab Action that developers can use to build AI-powered miniapps for the Collab.Land marketplace. The Collab Action uses the DALL·E 2 API to generate 10 images based on user input, you cycle through all the images and send the ones most fitting to your needs.
To use this Collab Action, follow these steps:
Run the following command to install the Action dependencies:
npm install
Create a .env
file and add your API keys for Collab.Land and Open AI. You can obtain API keys by signing up for the respective services. We've provided a basic structure in the .env.example
file to help you get started.
Note: The Collab.Land Action Public API key is not required to run the Collab Action locally if you set
SKIP_VERIFICATION
totrue
, but it is required to deploy the Collab Action to production. This Action Public API key serves to verify that the Collab Action is being used by an authentic Collab.Land user. You can obtain the Public API key from https://api-qa.collab.land/config. The following code obtains the API keys automatically through theSignatureVerifier
class.
Run the following command to build the project:
npm run build
Run the following command to start the Action server:
npm run start
By default, this will start the Action server on port 3000
. You can now make requests to the Action server using the ngrok URL.
Run the following command to start the Ngrok server:
ngrok http 3000
You can follow the instructions in the Collab.Land documentation to test the Collab Action locally.
If you would like to contribute to the Collab.Land + DALL·E 2 Collab Action, please fork the repository and submit a pull request. All contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.