demo.mov
Powered by Cohere's API for NLP.
(localhost:3001 by default)
cd McHacks/backend
touch .env
echo APIKEY="{COHERE_API_KEY}" > .env
python3 -m venv venv
source venv/bin/activate
(MacOS/*nix)pip install -r requirements.txt
python3 src/server.py
- /list-personas Retrieves all available personas.
- /add-persona
(POST) Creates a new persona config.
Expects a POST payload of the following format:
Returns an array of all persona names.
[ { "id": {ID}, 'optional' "question": "{UI FRIENDLY QUESTION}", 'optional' "realQuestion": "{QUESTION}", 'required' "answer": "{RESPONSE}" 'required }, ... ]
- /chat/{PERSONA}
(POST) Creates one new interaction with the {PERSONA}.
Expects a POST payload of the following format:
(GET) Retrieves all interactions with {PERSONA} Returns an array of individual interactions in the following format:
{ "prompt": "{MESSAGE/QUESTION/ETC}" }
[ { "user": "{MESSAGE/QUESTION/ETC}", "bot": "{RESPONSE}" }, ... ]
(localhost:3000 by default)
cd McHacks/frontend
npm i
npm start