Adicionar app/services/suggestion_service.py
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
class SuggestionService:
|
||||
def generate_suggestions(self, response: dict, intent: str, mode: str, prefs: dict):
|
||||
suggestions = []
|
||||
if intent == "chat" and mode == "advogado":
|
||||
suggestions.append("Quer que eu transforme isso em uma petição?")
|
||||
suggestions.append("Quer que eu pesquise jurisprudência sobre esse tema?")
|
||||
if intent == "chat" and mode == "corporativo":
|
||||
suggestions.append("Quer que eu gere um relatório executivo sobre isso?")
|
||||
suggestions.append("Quer que eu consulte normas recentes?")
|
||||
if intent == "document":
|
||||
suggestions.append("Quer exportar em PDF/A com assinatura digital?")
|
||||
return suggestions
|
||||
|
||||
def generate_quick_actions(self, response: dict, intent: str, mode: str, prefs: dict):
|
||||
actions = []
|
||||
if mode == "advogado":
|
||||
actions.append({"label": "Criar Petição", "action": "create_petition"})
|
||||
actions.append({"label": "Criar Parecer", "action": "create_opinion"})
|
||||
actions.append({"label": "Pesquisar Jurisprudência", "action": "search_case_law"})
|
||||
if mode == "corporativo":
|
||||
actions.append({"label": "Criar Relatório Executivo", "action": "create_report"})
|
||||
actions.append({"label": "Criar Comunicado Oficial", "action": "create_announcement"})
|
||||
return actions
|
||||
Reference in New Issue
Block a user