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

Save source of the task's response (website, discord-bot)

Open AbdBarho opened this issue 2 years ago • 5 comments

The backend should know the source of the response, whether it's coming from a web UI or from the discord bot.

This will require modifications both on the backend and the frontends.

AbdBarho avatar Jan 06 '23 09:01 AbdBarho

We already store the api_client_id with each message. We simply need a new frontend_type field in the api_client table, e.g. in the ApiClient class.

This is actually a good first-issue if someone wants to work on the backend. Beside the str member-addition as uasal an alembic migration script is necessary.

Non-contributors: Please write a short comment that you want to take this task .. we will then assign it to you.

andreaskoepf avatar Jan 06 '23 20:01 andreaskoepf

I would like to try it, to maybe understand the backend development process better :)

Just to clarify I need to update the database (e.g.: via Adminer) then run alembic revision -m "..." and update oasst-shared/api_client.py as well as backend/oasst-backend/models/api_client.py (?) Did I miss something?

jojopirker avatar Jan 07 '23 11:01 jojopirker

made a draft (#483)

jojopirker avatar Jan 07 '23 14:01 jojopirker

can we close this?

AbdBarho avatar Jan 08 '23 10:01 AbdBarho

can we close this?

Think it has a bug which will be fixed by #526 then once that's merged we can close this

olliestanley avatar Jan 08 '23 10:01 olliestanley

closing, since #526 is merged

yk avatar Jan 10 '23 21:01 yk