Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -74,6 +74,10 @@ def generate_text(request: Request, input_data: InputData):
|
|
| 74 |
return {"response": generated_response}
|
| 75 |
else:
|
| 76 |
input_data.asincrono = False
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
result_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))
|
| 78 |
LoggaTesto("RISPOSTA ASINCRONA FINALE", {"response": result_data})
|
| 79 |
if input_data.EliminaRisposteNonPertinenti:
|
|
|
|
| 74 |
return {"response": generated_response}
|
| 75 |
else:
|
| 76 |
input_data.asincrono = False
|
| 77 |
+
if input_data.EliminaRisposteNonPertinenti:
|
| 78 |
+
msgEliminaRisposteNonPertinenti = " (Rispondi solo sulla base delle ISTRUZIONI che hai ricevuto. se non trovi corrispondenza tra RICHIESTA e ISTRUZIONI rispondi con <NOTFOUND>!!!)"
|
| 79 |
+
input_data.input = input_data.input + msgEliminaRisposteNonPertinenti
|
| 80 |
+
input_data.systemRole = input_data.systemRole + msgEliminaRisposteNonPertinenti
|
| 81 |
result_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))
|
| 82 |
LoggaTesto("RISPOSTA ASINCRONA FINALE", {"response": result_data})
|
| 83 |
if input_data.EliminaRisposteNonPertinenti:
|