Open-Assistant
Open-Assistant copied to clipboard
Move update task interaction into OasstApiClient
Note: Waiting for https://github.com/LAION-AI/Open-Assistant/pull/342 to be merged.
The website directly calls the backend through fetch
here when it should be called through the OasstApiClient
.
- Create a new method in
website/src/lib/oasst_api_client.ts
'sOasstApiClient
which makes the API call done here. - Replace the original
fetch
call with the method call onOasstApiClient
. - Write a test in
website/cypress/contract/oasst_api_contract_tests.cy.ts
which calls that function and checks that the response is not null. An example of such a test can be found here
I haven't been tracking what this OasstApiClient
does. Could you outline what it's core methods are?
Nevermind, seeing the PR, i see this is a new thing you're creating. I like it.
Before closing this out, can you also do some refactoring to tackle #105? This basically needs to change how you set the user
field in the body being posted.
Before closing this out, can you also do some refactoring to tackle #105? This basically needs to change how you set the
user
field in the body being posted.
Sure, I can supply the JWT in the constructor of OasstApiClient so the client can be aware of the current user.