CarperAI / cheese

Used for adaptive human in the loop evaluation of language and embedding models.
MIT License
303 stars 24 forks source link

Connect backend to frontend #10

Closed jfdoming closed 2 years ago

jfdoming commented 2 years ago

Notes: There is additional error handling which would be nice to add later. For example, if the backend disconnects from a client (e.g., in local dev), the client will not try to reconnect. I wanted to get eyes on the code before focusing on these sorts of smaller details, though.

Testing: Install dependencies with pip3 install -r backend/requirements.txt, then run the backend with python3 test_api.py and click the link it spits out.

Notes: My editor rewrote the line endings in some of these files, so I'd recommend reviewing in "ignore whitespace" mode (append ?w=1 to the file viewer URL).

jfdoming commented 2 years ago

The file frontend/src/routes/client/[id]/index.svelte contains an example of how we might connect to the backend.