Spaces:
Running
Running
luanpoppe
commited on
Commit
·
8f3dc39
1
Parent(s):
5ffdf73
fix: endpoint usado pelo bubble
Browse files
gerar_documento/serializer.py
CHANGED
@@ -45,6 +45,7 @@ class GerarDocumentoSerializer(ResumoCursorSerializer):
|
|
45 |
gpt_temperature = serializers.FloatField(default=0)
|
46 |
id_modelo_do_usuario = serializers.IntegerField(required=False)
|
47 |
should_have_contextual_chunks = serializers.BooleanField(default=False) # type: ignore
|
|
|
48 |
|
49 |
|
50 |
class GerarDocumentoComPDFProprioSerializer(ResumoCursorSerializer):
|
|
|
45 |
gpt_temperature = serializers.FloatField(default=0)
|
46 |
id_modelo_do_usuario = serializers.IntegerField(required=False)
|
47 |
should_have_contextual_chunks = serializers.BooleanField(default=False) # type: ignore
|
48 |
+
should_use_llama_parse = serializers.BooleanField(required=False, default=False) # type: ignore
|
49 |
|
50 |
|
51 |
class GerarDocumentoComPDFProprioSerializer(ResumoCursorSerializer):
|
gerar_documento/views.py
CHANGED
@@ -28,7 +28,7 @@ class GerarDocumentoView(AsyncAPIView):
|
|
28 |
print(f"\n\nDATA E HORA DA REQUISIÇÃO: {datetime.now()}")
|
29 |
serializer = GerarDocumentoSerializer(data=request.data)
|
30 |
if serializer.is_valid(raise_exception=True):
|
31 |
-
if serializer.validated_data:
|
32 |
raise ValueError("Erro no validated_data")
|
33 |
data = cast(Dict[str, Any], serializer.validated_data)
|
34 |
print("\n\ndata: ", data)
|
|
|
28 |
print(f"\n\nDATA E HORA DA REQUISIÇÃO: {datetime.now()}")
|
29 |
serializer = GerarDocumentoSerializer(data=request.data)
|
30 |
if serializer.is_valid(raise_exception=True):
|
31 |
+
if not serializer.validated_data:
|
32 |
raise ValueError("Erro no validated_data")
|
33 |
data = cast(Dict[str, Any], serializer.validated_data)
|
34 |
print("\n\ndata: ", data)
|