Daniel Hug
f75a07301b
Conversation messages refactor add msg ids ( #500 )
...
* update ConversationMessage in protocal.py
* updated ConversationMessage instantiations in tasks.py and util.py to include message_id and frontend_message_id
* changed message_id and frontend_message_id to type UUID
* update ConversationMessage instantiation in main.py to include message_id and frontend_message_id"
* changed frontend_message_id to type str
* ran precomit
2023-01-07 19:16:32 +01:00
Andreas Köpf
96d6717be4
Fetch conversation for seed data tasks, minor model fixes ( #485 )
...
* Fetch conversation for seed data, fix models, remove redundant payload type checks
2023-01-07 15:59:54 +01:00
Ken Tsui
043b5eff5a
Add DEBUG_USD_SEED_DATA_PATH in config to make seed data flexible ( #395 )
...
* Add DEBUG_USD_SEED_DATA_PATH in config to make seed data flexible
* reformat
* Copy test_data folder in Dockerfile.backend, correct DEBUG_USE_SEED_DATA_PATH in cofig
* - make DEBUG_USE_SEED_DATA_PATH to absolute path
- correct test_data path in Dockerfile.backend
2023-01-07 14:37:30 +01:00
Nil Andreu
ee50b573e1
Detoxify Rest API Client ( #404 )
...
* [NEW] utils: Endpoint Toxic Roberta
* [NEW] Constants API URL
* [NEW] Git ignore venv
* [NEW] Lint
* [NEW] Backend default args
* [NEW] HUGGINGFACE_API_ERROR
* [NEW] Requests package
* [NEW] Get Toxicity Endpoint
* [NEW] Schema: ToxicityClassification
[NEW] Constants module
[FIX] Module
* [FIX] Test Key HF
* [NEW] settings: HUGGING_FACE_API_KEY
* [NEW] Remove requests
* [NEW] HuggingFace client
* [NEW] Cleaning code
2023-01-05 16:18:04 +01: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
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
kiritowu
2a2968f6d4
Initialise redis connection for Fastapi limiter
2023-01-03 00:28:05 +08:00
Gareth Davidson
7000e10bc0
apply pre-commit rules
2023-01-02 00:01:45 +00:00
Jack Michaud
29b08875d4
refactor: move print_openapi_schema into main
2023-01-01 18:58:01 +01:00
Andreas Köpf
ee14554e1b
role='user' -> role='prompter'
2022-12-31 00:18:55 +01:00
Andreas Köpf
26ae43e945
additional forgotten renamings
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
35e0c32a08
Updating work_package to task
2022-12-31 00:18:55 +01:00
alexandrelefourner
7743459220
Renaming post to message
2022-12-31 00:18:55 +01:00
Andreas Köpf
c5053ed6c9
fix typo: uesr->user
2022-12-29 16:13:30 +01:00
Andreas Köpf
833549f212
add two dummy user replies depth>1
2022-12-29 15:58:35 +01:00
Andreas Köpf
30db7254c7
rename flag to DEBUG_USE_SEED_DATA default False, update compose config
2022-12-29 15:58:35 +01:00
Andreas Köpf
c2cb2562d5
add db seed-data check on backend startup
2022-12-29 15:58:35 +01:00
Andreas Köpf
0c3103838b
add OasstErrorCode IntEnum, use http.HTTPStatus enum
2022-12-28 19:25:39 +01:00
Andreas Köpf
36c74e238c
rename handler function to
2022-12-28 14:22:53 +01:00
Andreas Köpf
dda668bcd5
Add OasstError exception class and exception filter
2022-12-28 14:10:15 +01:00
Yannic Kilcher
b34ef75423
started re-working python code
2022-12-19 18:00:09 +01:00