Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Allow searching the questions and responses

Open opfromthestart opened this issue 2 years ago • 3 comments

Being able to search the dataset for questions that have already been asked before you ask the question would be nice. What would need to be done for this to be implemented? I would like to contribute to the project.

opfromthestart avatar Feb 09 '23 17:02 opfromthestart

This would require both backend support for a message search endpoint and frontend work to use it. If you would like to work on this, let me know.

olliestanley avatar Feb 09 '23 21:02 olliestanley

I would like to work on this. Could you give a rough pointer to where in the codebase each of those would have to be? I would probably be better on the backend part but I could get a simple frontend working after that.

opfromthestart avatar Feb 10 '23 19:02 opfromthestart

We use a Python with FastAPI backend and SQLAlchemy. You may be able to use one of the existing API routes for message search, but if they don't have sufficient functionality you may need to create a new one.

Here are the messages API routes: https://github.com/LAION-AI/Open-Assistant/blob/main/backend/oasst_backend/api/v1/messages.py

The prompt repository which handles DB queries relating to messages: https://github.com/LAION-AI/Open-Assistant/blob/main/backend/oasst_backend/prompt_repository.py

And here is the messages SQL table: https://github.com/LAION-AI/Open-Assistant/blob/main/backend/oasst_backend/models/message.py

I'm much less familiar with the frontend but I would recommend working on the backend side first as one PR, then someone from the web team may be willing to help add a UI to the website for it.

If you have any other questions feel free to message in the Discord thread :)

olliestanley avatar Feb 10 '23 21:02 olliestanley