Skip to content

A road-to-onoeiros event organized by MUJ ACM.

Notifications You must be signed in to change notification settings

mujsigai/reverse

 
 

Repository files navigation

Reverse Turing

Reverse turing, an oneiros minor event under MUJ ACM. The event had 3 rounds:

  1. Generative AI - The participants were showed few 3 images of various difficulty, they would have to recreate the image using their own prompts and tools.
  2. AI Fued - Similar to the Family Fued, the partipants would have to guess the answers for AI related questions.
  3. Reverse Turing - Omegle like platform for one-to-one conversation with a set limit of 150 seconds. The participants would have to hold a conversation on the given topic (shown on chatroom UI) and based on the conversation, the participant would have to guess if they were talking to a human or AI.

NOTICE: This repository is the codebase for round 3.

Installation guide

  1. Install Python.
  2. On your terminal run
cd reverse-turing

# install the required packages
pip install -r requirements.txt
  1. Update the creds.env (very important step).
# Database schema is given below please create a user accordingly
mongo_url = "MONGO URL e.g. mongodb://localhost:27017/ or altas url"

# This is what will be used for JWT token and authentication.
jwt_secret = "YOUR JWT SECRET"

# openrouter is the provider used for the AI. llama 3.3 70B
APIKEY = "openrouter.ai API KEY"
APIKEY1 = "openrouter.ai API KEY"
  1. Run
py main.py

UI Screenshots - User

Login alt text

Dashboard alt text

Leaderboard alt text

Match making alt text

Chatroom alt text

UI Screenshots - Admin

Login alt text

Dashboard alt text

Chat Log alt text

Admin Abuse alt text

Create User alt text

Ban Users alt text

Funny Conversations

Some of the few funniest conversations I found. funny1 funny2 funny3 funny4

Database Schema

This consists of the collections required for your MongoDB. Create all the required collections in your DB.

users collection.

{
    "_id": "username",
    "password": "password",
    "token": "JWT token with {'username':'...', 'type':'user/admin'}",
    "matchmaking": true, // if true then the user is actively looking for a match
    "score": 20, // points to show on leaderboard. 5 for correct guess, 0 for wrong
    "type": "user/admin", // admin will be able to login in ADMIN portal.
    "lastpoint": 2314234532423, // epoch for last time user scored. leaderboard stuff
    "banned": false, // if true, the user wont be able to login or match making
    "previous": "AI/someone elses username",
    "judged": ["lsdyhsakldjashj"], // uuid for chatroom that were already judged.
}

Add an admin account manually.

{
    "_id":"root",
    "password":"root",
    "token":"CREATE TOKEN WITH YOUR OWN JWT TOKEN",
    "matchmaking":false,
    "score":0,
    "type":"admin",
    "lastpoint":0,
    "banned":false
}

chats collection.

{
    "_id": "UUID for chatroom",
    "messages": ["format used everywhere in openai [{...}, {...}]"],
    "user1": "username of user1",
    "user2": "AI/username of user", // AI will always be user2
    "time": 9328742983749, // epoch time
    "active": true, // true means active else otherwise
}

reports collection. (no use)

{
    "_id":  "random generated report ID",
    "reportby": "reported by username",
    "reported": "who got reported username/AI",
    "message": "the message which was reported",
    "time": 97231649823, //epoch time converted to IST
}

adminlogs collection.

{
    "_id": "action ID",
    "admin": "admin username",
    "action": "banned XYZ username",
    "time": 8721638712, // you get the point
}

About

A road-to-onoeiros event organized by MUJ ACM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 45.4%
  • Python 36.2%
  • CSS 17.8%
  • Other 0.6%