StampyAI / stampy-chat

Conversational chatbot to answer questions about AI Safety & Alignment based on information retrieved from the Alignment Research Dataset
https://chat.stampy.ai
MIT License
12 stars 5 forks source link

Tidy up frontend #88

Closed mruwnik closed 9 months ago

mruwnik commented 10 months ago

This is mainly moving things around so the code is more modular. The search functionality has been refactored - there are comments showing what has changed

FraserLee commented 10 months ago

I'll defer on reviewing this till the others are merged since it depends on those changes, but broadly it seems like a lot of what this PR is doing is just increasing file count - doesn't inherently improve code quality. I'll check out the details after.

mruwnik commented 10 months ago

This now points directly to main, so is independent of the other branches.

It does increase the count, in that a large part of it is moving components into their own files.

The main changes are in the bit which actually queries the LLM/aisafety.info, which got split up into smaller (hopefully more understandable) functions. It took me a while to realise the the massive loop was simply a state machine. I changed it to only mutate a single state variable (the current item), and only append the exchange once it has finished.

I can split this up into smaller ones, but am a lot less certain that I'd do it properly, so would prefer not too. I will if requested, though

mruwnik commented 9 months ago

I split it up into smaller ones, so will close this