examples/nextjs
folder so change your current working directory by running the command - cd <your_forked_repo>/examples/nextjs
pip install -r requirements.txt
ec_app
folder for you. Feel free to ingest data of your choice to power the App.
ec_app
folder and create .env
file in this folder and set your OpenAI API key as shown in .env.example
file. If you want to use other open-source models, feel free to use the app config in app.py
. More details for using custom configuration for Embedchain app is available here.fly.toml
file and update the name
variable to something unique. This is important as fly.io
requires users to provide a globally unique deployment app names.
Now, we need to launch this application with fly.io. You can see your app on fly.io dashboard. Run the following command to launch your app on fly.io:
ec deploy
to deploy your app on Fly.io. Once you deploy your app, save the endpoint on which our discord and slack bot will send requests.
OPENAI_API_KEY
to run this discord bot. Follow the remaining instructions to create a discord bot app. We recommend you to give the following sets of bot permissions to run the discord bot without errors:nextjs_discord
folder and create .env
file and define your discord bot token, discord bot name and endpoint of your embedchain app as shown in .env.example
file.
To run the app in development:
fly.toml
file and update the name
variable to something unique. This is important as fly.io
requires users to provide a globally unique deployment app names.
Now, we need to launch this application with fly.io. You can see your app on fly.io dashboard. Run the following command to launch your app on fly.io:
ec deploy
to deploy your app on Fly.io. Once you deploy your app, your discord bot will be live!
From Scratch
, then enter the Bot Name and select your workspace.App Credentials
section on the Basic Information
tab from the left sidebar, create your app token and save it in your .env
file as SLACK_APP_TOKEN
.Socket Mode
tab from the left sidebar and enable the socket mode to listen to slack message from your workspace.App Home
tab you can change your App display name and default name.Event Subscription
tab, and enable the event subscription so that we can listen to slack events.Add Bot User Event
button and select app_mention
.OAuth and Permissions
and add the following scopes under Bot Token Scopes
:Install to Workspace
and after itโs done, copy the Bot User OAuth Token
and set it in your .env
file as SLACK_BOT_TOKEN
.nextjs_slack
folder and create .env
file and define your slack bot token, slack app token and endpoint of your embedchain app as shown in .env.example
file.
To run the app in development:
fly.toml
file and update the name
variable to something unique. This is important as fly.io
requires users to provide a globally unique deployment app names.
Now, we need to launch this application with fly.io. You can see your app on fly.io dashboard. Run the following command to launch your app on fly.io:
ec deploy
to deploy your app on Fly.io. Once you deploy your app, your slack bot will be live!