File size: 907 Bytes
e63103b
 
 
 
 
 
 
 
 
 
 
9717e5b
e63103b
9717e5b
 
 
b700f35
 
9717e5b
3b3d8b9
3f199c2
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from rest_framework import serializers

from endpoint_teste.models import EndpointTesteModel

class EndpointTesteSerializer(serializers.ModelSerializer):
    class Meta:
        model = EndpointTesteModel
        fields = "__all__"
    
class TesteSerializer(serializers.Serializer):
    history_chat = serializers.ListField(read_only=True, required=False)
    system_prompt = serializers.CharField(required=True)
    user_message = serializers.CharField(required=True)
    pdf_url = serializers.CharField(required=False)

class PDFUploadSerializer(serializers.Serializer):
    # file = serializers.FileField()
    files = serializers.ListField(child=serializers.FileField(), required=True)
    system_prompt = serializers.CharField(required=True)
    user_message = serializers.CharField(required=True)
    model = serializers.CharField(required=False)
    embedding = serializers.CharField(required=False)