MangoTruth is an open srouce AI detection system focused on:
When adding new model, check out our training guidelines!
Repository consists of:
frontend(py)
- user interface, authentication and requests routingcore(go)
- main application server that provides rest endpoints for both external integrations and frontend
.
Handles subscriptions, persistence, risk management, external integration and routes requests to execution venuescompute(py)
- compute engine of the system. Routes compute requests to detectors on both centralized and community
serversdetectors(py)
- purely python code with implementation of known algorithms for AI detection implementing simple
interface.Name | Paper | val F1 | val AUC | Neptune URL |
---|---|---|---|---|
GLTR | link | TBD | TBD | TBD |
Ghostbuster | link | 0.981 | 0.971 | link |
Perplexity baseline | - | 0.662 | 0.5 | link |
To set up installation on your environment follow these steps:
core/config/config-development.yml
file. Extensive configuration reference coming soonsqlboiler --wipe --output .\core\pkg\storage\models psql
go build ./core/cmd/server
go run core/cmd/server/main.go
Execute the following command from the project directory
docker volume create storage
docker-compose up --build -d
1) The front-end is accessible from http://localhost:7860/ 2) The back-end is accessible from http://localhost:8080/ or http://core:8080/
frontend
directory)
docker build -t front-end-mango-truth .
docker run -d --name front-end-mango-truth -p 7860:7860 front-end-mango-truth
docker build --tag mango-truth-core:1.0.0 --file ./core/Dockerfile .
docker run -d --name core -p 8080:8080 -e COMPUTE_HOST='host.docker.internal' mango-truth-core:1.0.0
MAKEFILE
commands to run core+rabbitmq in separate docker network.
network
run-rabbitmq
run-core
run-postgres
docker build --tag mango-truth-compute:1.0.0 --file ./compute/Dockerfile .
docker run -d --name compute -e RABBITMQ_HOST=host.docker.internal mango-truth-compute:1.0.0
Generally, all variables mentioned here follow uppercase naming with "_" as delimiter for env variable and camelcase for
.yml
config
files. Example:
Specifing SERVER_PORT=8080
in env is equivalent to specifying in corresponding config location.
server:
port: 8080
Config is resolved by path ./core/config/config-development.yml
. TODO: Add option to override location.
Variable | Usage | Default |
---|---|---|
server.port |
port of server on which core listens | 8080 |
compute.host |
host of RabbitMQ | 127.0.0.1 |
compute.username |
credentials for RabbitMQ | guest |
compute.password |
credentials for RabbitMQ | guest |
storage.databaseName |
credentials for PostgreSQL | mango-db |
storage.userName |
credentials for PostgreSQL | mango-user |
storage.password |
credentials for PostgreSQL | password |
storage.hostName |
credentials for PostgreSQL | postgres |
Variable | Usage | Default |
---|---|---|
server.url |
url of server on which compute listens | http://localhost:8080 |
gradio.server.name |
URL on which frontend listens | 127.0.0.1 |
gradio.server.port |
port on which frontend listens | 7860 |
Variable | Usage | Default |
---|---|---|
rabbitmq.port |
port of server on which core listens | 8080 |
rabbitmq.host |
host of RabbitMQ | 127.0.0.1 |
rabbitmq.username |
credentials for RabbitMQ | guest |
rabbitmq.password |
credentials for RabbitMQ | guest |
API endpoints are available in core/docs/swagger.json
file.
To generate docs for core endpoints run the following command:
cd core
swag init -g ./cmd/server/main.go --output ./docs