-
转化脚本如下,模型和lora都可以在huggingface找到:
```python
from transformers import AutoTokenizer, AutoModel
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("./chatglm-fitness-RLHF", trust_…
-
I'm trying to implement my own serializer and view to handle Token based authentication with email instead of username. In copying the [ObtainAuthToken](https://github.com/encode/django-rest-framework…
-
## 実装方法
- `restframework` が第一候補
- https://www.django-rest-framework.org/
-
It would be nice, I think, if the headless API endpoints honored any `ACCOUNT_FORMS` overrides set in account configuration.
However, it seems that e.g. the parent classes of `RequestPasswordResetI…
-
**Edit (Fix found):** I found the solution to get it working. I was missing `AWS_LOCATION = STATIC_LOCATION`. Adding that line made the static path work correctly for all libraries. It seems a bit con…
KaivG updated
2 months ago
-
Business Reason
The `django-rest-swagger` package is no longer supported, and is not compatible with Django 3.x. When we upgraded to Django 3.x, we broke the API documentation.
See https:/…
-
First off, great work! :smile:
An idea: Flask-restful has a module called `reqparse` that is intended to be used as the main way to consume request parameters from within an endpoint. I am wonderi…
-
## Environment
* python3.8
* Django 2.2.9
* restframework 3.11.0
## Steps to reproduce
``` python
class MySerializer(serializers.Serializer):
my_field_name = serializers.CharField(max…
-
When using `UrlManField` with `drf-spectacular` I get `AttributeError: 'UrlManField' object has no attribute 'allow_null'` when visiting the docs.
-
django 5.0.3
djangorestframework 3.15.0
rest-framework-roles 1.0.4
``` python
def is_test(request, view):
return True
ROLES = {
# Django out-of-the-box
'admin': is_admin,
…