Because I am lazy, and this is an AI project after all, I decided to let Badley describe itself:
To run Badley, you will need a Java 21 Runtime, or you can use the published Docker images. Additionally, you will need to have a PostgreSQL database running, or you can use the H2 in-memory database for testing purposes.
Docker images to run Badley are published for every release under the tag ghcr.io/parzival-space/badley
.
You will still need to provide your own PostgreSQL database and API keys for the services you want to use.
See the Configuration section for more details.
The docker-compose.yml
file in the docker
directory can be used to spin up all required services to run Badley
locally. Keep in mind that you still need to provide your own API Keys and credentials for the services you want to use.
You will also need to configure Badley to use the local services:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/badley
username: postgres
password: postgres
ai:
openai:
api-key: # Your OpenAI API key
#base-url: https://openrouter.ai/api
badley:
discord:
token: # Your Discord bot token, see https://discord.com/developers/applications
Badley is designed to easily integrate with various services.
For most services you need to define API credentials, which is done through a application.yml
file.
Below is a sample configuration for each service:
spring:
datasource:
# Badley supports PostgreSQL and H2
# PostgreSQL: jdbc:postgresql://<host>:<port>/<database>
# H2: jdbc:h2:mem:badley
url: jdbc:postgresql://localhost:5432/badley
username: postgres
password: postgres
ai:
openai:
api-key: # Your OpenAI API key
#base-url: https://openrouter.ai/api # Optional, you can use a different OpenAI API compatible service
# or if you want to use a local LLM (ollama):
#ollama:
# base-url: http://localhost:11434
# model: # The model you want to use
model: openai # Or ollama
badley:
discord:
token: # Your Discord bot token, see https://discord.com/developers/applications
ai:
tools:
github:
enabled: true # Or false to disable
token: # Your PAT GitHub token. No scopes are needed, but you can add private repo access if you want to.
openweather:
enabled: true # Or false to disable
token: # Your OpenWeather API key
steam:
enabled: true # Or false to disable
token: # Your Steam Web API key, see https://steamcommunity.com/dev/apikey
brave:
enabled: true # Or false to disable
token: # Your Brave Search API key, see https://brave.com/search/api/
google:
enabled: false # Or false to disable
token: # Your Google Custom Search API key, see https://developers.google.com/custom-search/v1/overview
engine-id: # The Engine Id, see above
youtube:
enabled: true # Or false to disable
token: # Your YouTube Data API v3 key, see https://developers.google.com/youtube/v3/getting-started
spotify:
enabled: true # Or false to disable
client-id: # Your Spotify client id, see https://developer.spotify.com/documentation/general/guides/app-settings/
client-secret: # Your Spotify client secret, see above
wikipedia:
enabled: true # Or false to disable
ipapi:
enabled: true # Or false to disable
# Define how much of the own IP address the bot is allowed to expose to the conversation
# disabled = The bot does not know its own IP and locations
# show_location = The bot knows its own IP and location, but will only respond with the location
# show_ip_and_location = The bot knows its own IP and location, and will respond with both
expose-self-visibility: show_location
Contributions are welcome! If you have any ideas, suggestions, or issues, feel free to open an issue or a pull request.
This project is licensed under the GNU GPLv3 License. See the LICENSE file for details.