Commit Graph

26 Commits

Author SHA1 Message Date
Jack Michaud c8aba77a48 chore: pin aiohttp version 2023-01-02 21:11:14 -05:00
Jack Michaud 3dcfe7014e test: add test for unhandled api error 2023-01-02 21:06:00 -05:00
Jack Michaud f66ad30c53 fix: handle empty 204 response 2023-01-02 21:00:23 -05:00
Jack Michaud bc796b70ba test: finish test for handling oasst error 2023-01-02 20:59:59 -05:00
Jack Michaud fbcb0a09e6 chore: move aiohttp client into oasst-shared 2023-01-02 20:38:10 -05:00
Jack Michaud c2a5e08a32 (WIP) test: add test for handling OasstError 2023-01-02 19:07:01 -05:00
Jack Michaud fe21732f8d feat: handle OasstError in OasstApiClient 2023-01-02 19:06:30 -05:00
Jack Michaud 5bb9a397b4 feat: add OasstErrorResponse to protocols
Using a shared protocol to serialize the error in the backend
allows clients to use that same protocol to deserialize it.

Changes to this protocol will be caught in tests.
2023-01-02 19:01:29 -05:00
yeungadrian 4715a53637 #47- Create API endpoints that return leaderboards (#250)
* Leaderboard endpoints proof of concept
- New leaderboards router
- Two endpoints /api/v1/leaderboards/assistant & /api/v1/leaderboards/prompter
- Function in prompt_repository to calculate user scores

* Separating create vs 'eventual' evaluate routes

* Adding display_name to result

* Missing / in routes

* Updating route to be experimental

* Fixing format for pre-commit
2023-01-02 22:38:54 +01:00
Jack Michaud ed115ea17c refactor: move OasstApiClient into oasst-shared (#287)
* refactor: move api_client into oasst-shared

* refactor: move contract tests into oasst-shared

* fix: use new OasstApiClient imports in discord bot
2023-01-02 22:13:20 +01:00
Jack Michaud c7ac01718c refactor: move OasstError into oasst_shared.exceptions (#289)
* refactor: move OasstError into oasst_shared.exceptions

* fix: update OasstError import

* fix: linter errors
2023-01-02 22:03:53 +01:00
Gareth Davidson 7000e10bc0 apply pre-commit rules 2023-01-02 00:01:45 +00:00
Jack Michaud 904f442f5a fix: indicate that user is optional 2023-01-01 18:58:01 +01:00
Andreas Köpf 7b29582cbb add to protocol.Message 2022-12-31 19:23:54 +01:00
Igor Miagkov ef3a35ff9c fixes 2022-12-31 10:31:31 +01:00
Igor Miagkov 475f48b195 stats api method 2022-12-31 10:31:31 +01:00
Igor Miagkov 13d01b5a2f management api 2022-12-31 10:31:31 +01:00
Andreas Köpf ee14554e1b role='user' -> role='prompter' 2022-12-31 00:18:55 +01:00
Andreas Köpf 8b225430a4 BREAKING-CHANGES: Renaming several models/database objects + API protocol
person -> user
work_package -> task
post -> message
thread -> message_tree
2022-12-31 00:18:55 +01:00
alexandrelefourner 7743459220 Renaming post to message 2022-12-31 00:18:55 +01:00
Igor Miagkov efafc0173a added support for collective tasks 2022-12-29 21:32:17 +04:00
Andreas Köpf f74fe68f87 add journal table and JournalWriter helper class 2022-12-27 22:37:48 +01:00
Yannic Kilcher 55d003adbe added parens for readability 2022-12-25 19:00:13 +01:00
Yannic Kilcher a37bf6bf41 added text labels to the API 2022-12-25 17:08:57 +01:00
Andreas Köpf aa26c4ad03 fix bot script post oasst_shared creation 2022-12-20 00:55:39 +01:00
Yannic Kilcher b34ef75423 started re-working python code 2022-12-19 18:00:09 +01:00