Spaces:
Running
Running
luanpoppe
commited on
Commit
·
9644984
1
Parent(s):
9acef67
feat: quando houver mais etapas na geração do documento, adicionar um espaço entre a primeira e segunda resposta
Browse files
_utils/gerar_documento.py
CHANGED
@@ -61,6 +61,9 @@ async def gerar_documento(
|
|
61 |
serializer.should_use_llama_parse,
|
62 |
isBubble,
|
63 |
)
|
|
|
|
|
|
|
64 |
|
65 |
is_contextualized_chunk = serializer.should_have_contextual_chunks
|
66 |
|
@@ -134,7 +137,9 @@ async def gerar_documento(
|
|
134 |
x["source"]["text"] = x["source"]["text"][0:200]
|
135 |
x["source"]["context"] = x["source"]["context"][0:200]
|
136 |
|
137 |
-
texto_completo_como_html = convert_markdown_to_HTML(texto_completo)
|
|
|
|
|
138 |
axiom_instance.send_axiom(
|
139 |
f"texto_completo_como_html: {texto_completo_como_html}"
|
140 |
)
|
|
|
61 |
serializer.should_use_llama_parse,
|
62 |
isBubble,
|
63 |
)
|
64 |
+
axiom_instance.send_axiom(
|
65 |
+
f"INÍCIO DO TEXTO COMPLETO DOS PDFS: {full_text_as_array[0:5]}"
|
66 |
+
)
|
67 |
|
68 |
is_contextualized_chunk = serializer.should_have_contextual_chunks
|
69 |
|
|
|
137 |
x["source"]["text"] = x["source"]["text"][0:200]
|
138 |
x["source"]["context"] = x["source"]["context"][0:200]
|
139 |
|
140 |
+
texto_completo_como_html = convert_markdown_to_HTML(texto_completo).replace(
|
141 |
+
"resposta_segunda_etapa:", "<br><br>"
|
142 |
+
)
|
143 |
axiom_instance.send_axiom(
|
144 |
f"texto_completo_como_html: {texto_completo_como_html}"
|
145 |
)
|
_utils/gerar_relatorio_modelo_usuario/GerarDocumento.py
CHANGED
@@ -291,7 +291,9 @@ class GerarDocumento:
|
|
291 |
)
|
292 |
documento_gerado = llm.invoke(prompt_etapa_2).content
|
293 |
resposta_segunda_etapa = documento_gerado
|
294 |
-
texto_final_juntando_as_etapas +=
|
|
|
|
|
295 |
self.axiom_instance.send_axiom(f"RESULTADO ETAPA 2: {documento_gerado}")
|
296 |
|
297 |
if self.prompt_gerar_documento_etapa_3:
|
|
|
291 |
)
|
292 |
documento_gerado = llm.invoke(prompt_etapa_2).content
|
293 |
resposta_segunda_etapa = documento_gerado
|
294 |
+
texto_final_juntando_as_etapas += (
|
295 |
+
f"\n\nresposta_segunda_etapa:{resposta_segunda_etapa}"
|
296 |
+
)
|
297 |
self.axiom_instance.send_axiom(f"RESULTADO ETAPA 2: {documento_gerado}")
|
298 |
|
299 |
if self.prompt_gerar_documento_etapa_3:
|