elly99 commited on
Commit
07ae937
·
verified ·
1 Parent(s): 4a1962b

Create interaction/final_response.py

Browse files
Files changed (1) hide show
  1. src/interaction/final_response.py +12 -0
src/interaction/final_response.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #Visualizzazione risposta
2
+ risposta = None
3
+ try:
4
+ risposta = llm.invoke(prompt.strip())
5
+ except Exception as e:
6
+ logging.error(f"Errore nella generazione della risposta: {e}")
7
+
8
+ if risposta:
9
+ print("\nRisultato:\n")
10
+ print(getattr(risposta, "content", str(risposta)))
11
+ else:
12
+ print("Nessuna risposta disponibile.")