Skip to content

Nikola-Milekic/McHacks10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 

Repository files navigation

    Build-a-Buddy

Create specialized conversational chat bots with a user-friendly UI.

McHacks10 - McGill University Hackathon




demo.mov

Powered by Cohere's API for NLP.

Getting started

Flask Backend

Starting the server

(localhost:3001 by default)

  1. cd McHacks/backend
  2. touch .env
  3. echo APIKEY="{COHERE_API_KEY}" > .env
  4. python3 -m venv venv
  5. source venv/bin/activate (MacOS/*nix)
  6. pip install -r requirements.txt
  7. python3 src/server.py

Flask Endpoints

  1. /list-personas Retrieves all available personas.
  2. /add-persona (POST) Creates a new persona config. Expects a POST payload of the following format:
    [
        {
            "id": {ID}, 'optional'
            "question": "{UI FRIENDLY QUESTION}", 'optional'
            "realQuestion": "{QUESTION}", 'required'
            "answer": "{RESPONSE}" 'required
        },
        ...
    ]
    
    Returns an array of all persona names.
  3. /chat/{PERSONA} (POST) Creates one new interaction with the {PERSONA}. Expects a POST payload of the following format:
    {
        "prompt": "{MESSAGE/QUESTION/ETC}"
    }
    
    (GET) Retrieves all interactions with {PERSONA} Returns an array of individual interactions in the following format:
    [  
        {    
            "user": "{MESSAGE/QUESTION/ETC}",
            "bot": "{RESPONSE}"
        },
        ...
    ]
    

React Frontend

Starting the app

(localhost:3000 by default)

  1. cd McHacks/frontend
  2. npm i
  3. npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •