feat: Update welcome messages and user prompts to Portuguese
- Revised welcome message to be more natural and emoji-free. - Translated session reset and routing messages to Portuguese. - Enhanced loading indicators and execution messages for better user experience. - Updated chainlit.md to provide a comprehensive overview of available agents and usage instructions in Portuguese.
This commit is contained in:
parent
3a967f4fe6
commit
41b9f1f1d3
|
|
@ -39,7 +39,10 @@ build/
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# Chainlit
|
# Chainlit
|
||||||
# ===========================================
|
# ===========================================
|
||||||
.chainlit/
|
# Keep .chainlit/config.toml and .chainlit/assets/ in repo for theme customization
|
||||||
|
# But ignore runtime files
|
||||||
|
.chainlit/*.db
|
||||||
|
.chainlit/*.log
|
||||||
.files/
|
.files/
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
|
|
||||||
36
chainlit.md
36
chainlit.md
|
|
@ -1,14 +1,34 @@
|
||||||
# Welcome to Chainlit! 🚀🤖
|
# Antigravity Brain - Minions da ITGuys
|
||||||
|
|
||||||
Hi there, Developer! 👋 We're excited to have you on board. Chainlit is a powerful tool designed to help you prototype, debug and share applications built on top of LLMs.
|
Bem-vindo ao centro de comando da **Inteligência Artificial Corporativa da ITGuys**.
|
||||||
|
|
||||||
## Useful Links 🔗
|
Aqui você tem acesso a **26 Agentes Especializados** prontos para colaborar, resolver problemas complexos e executar tarefas em nossa infraestrutura e negócios.
|
||||||
|
|
||||||
- **Documentation:** Get started with our comprehensive [Chainlit Documentation](https://docs.chainlit.io) 📚
|
---
|
||||||
- **Discord Community:** Join our friendly [Chainlit Discord](https://discord.gg/k73SQ3FyUh) to ask questions, share your projects, and connect with other developers! 💬
|
|
||||||
|
|
||||||
We can't wait to see what you create with Chainlit! Happy coding! 💻😊
|
## O que podemos fazer por você hoje?
|
||||||
|
|
||||||
## Welcome screen
|
### Engenharia & Infraestrutura
|
||||||
|
* **Arthur M. & Gus Fring:** Automação Zabbix, validação de templates e estabilidade de sistemas.
|
||||||
|
* **Tony Stark:** DevOps e automação de código.
|
||||||
|
|
||||||
To modify the welcome screen, edit the `chainlit.md` file at the root of your project. If you do not want a welcome screen, just leave this file empty.
|
### Segurança Ofensiva & Defensiva
|
||||||
|
* **Elliot & Devil:** Testes de intrusão, segurança e auditoria de vulnerabilidades.
|
||||||
|
|
||||||
|
### Negócios & Estratégia
|
||||||
|
* **Harvey & Kevin:** Compliance jurídico, análise de ROI e estratégia corporativa.
|
||||||
|
|
||||||
|
### Vendas & Crescimento
|
||||||
|
* **Ari Gold & Don Draper:** Fechamento de negócios, pitches e prospecção agressiva.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Como usar?
|
||||||
|
|
||||||
|
Basta digitar sua solicitação naturalmente. O sistema de **Roteamento Inteligente** irá invocar a Crew ou Agente ideal para o seu problema.
|
||||||
|
|
||||||
|
> **Exemplo:** "Preciso validar um template do Zabbix" ou "Crie uma estratégia de vendas para o novo produto".
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Sistema Privado ITGuys - Acesso Restrito*
|
||||||
|
|
|
||||||
24
src/app.py
24
src/app.py
|
|
@ -8,8 +8,8 @@ from src.router import SmartRouter
|
||||||
|
|
||||||
@cl.on_chat_start
|
@cl.on_chat_start
|
||||||
async def on_chat_start():
|
async def on_chat_start():
|
||||||
# No more menus! Just a welcome.
|
# Welcome message without emojis, more natural
|
||||||
await cl.Message(content="🧠 **Antigravity Brain Online.**\n\nI am ready. Just tell me what you need (e.g., *'Check the server health'* or *'Create a new agent named Bob'*).").send()
|
await cl.Message(content="**Antigravity Brain Online**\n\nEstou pronto para ajudar. Pode me dizer o que precisa? Por exemplo: *'Verificar a saúde do servidor'* ou *'Criar um novo agente'*.").send()
|
||||||
cl.user_session.set("selected_crew", None)
|
cl.user_session.set("selected_crew", None)
|
||||||
|
|
||||||
@cl.on_message
|
@cl.on_message
|
||||||
|
|
@ -19,7 +19,7 @@ async def on_message(message: cl.Message):
|
||||||
# 1. Check for commands
|
# 1. Check for commands
|
||||||
if user_input.strip() == "/reset":
|
if user_input.strip() == "/reset":
|
||||||
cl.user_session.set("selected_crew", None)
|
cl.user_session.set("selected_crew", None)
|
||||||
await cl.Message(content="🔄 Session reset. I will re-evaluate the best crew for your next request.").send()
|
await cl.Message(content="Sessão reiniciada. Vou reavaliar a melhor equipe para sua próxima solicitação.").send()
|
||||||
return
|
return
|
||||||
|
|
||||||
# 2. Determine Crew
|
# 2. Determine Crew
|
||||||
|
|
@ -33,17 +33,19 @@ async def on_message(message: cl.Message):
|
||||||
# No, that's risky. Let's stick to: Route First -> Sticky -> User can /reset.
|
# No, that's risky. Let's stick to: Route First -> Sticky -> User can /reset.
|
||||||
|
|
||||||
if not current_crew:
|
if not current_crew:
|
||||||
msg_routing = cl.Message(content="🤔 Analyzing request...")
|
# Show loading indicator while routing
|
||||||
|
msg_routing = cl.Message(content="Analisando sua solicitação...")
|
||||||
await msg_routing.send()
|
await msg_routing.send()
|
||||||
|
|
||||||
current_crew = SmartRouter.route(user_input)
|
current_crew = SmartRouter.route(user_input)
|
||||||
cl.user_session.set("selected_crew", current_crew)
|
cl.user_session.set("selected_crew", current_crew)
|
||||||
|
|
||||||
await msg_routing.update()
|
await msg_routing.update()
|
||||||
await cl.Message(content=f"👉 **Routing to:** {current_crew}").send()
|
await cl.Message(content=f"**Direcionando para:** {current_crew}").send()
|
||||||
|
|
||||||
# 3. Execution
|
# 3. Execution with proper loading indicator
|
||||||
msg = cl.Message(content=f"🚀 **{current_crew}** is working on it...")
|
# Create a message that will show loading state and be updated with the result
|
||||||
|
msg = cl.Message(content=f"**{current_crew}** está processando sua solicitação...")
|
||||||
await msg.send()
|
await msg.send()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -55,12 +57,12 @@ async def on_message(message: cl.Message):
|
||||||
result = crew.kickoff(inputs={"topic": user_input})
|
result = crew.kickoff(inputs={"topic": user_input})
|
||||||
final_answer = str(result)
|
final_answer = str(result)
|
||||||
|
|
||||||
# Update message
|
# Update message with final result
|
||||||
msg.content = f"### ✅ Report from {current_crew}\n\n{final_answer}"
|
msg.content = f"### Relatório de {current_crew}\n\n{final_answer}"
|
||||||
await msg.update()
|
await msg.update()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg.content = f"❌ **Mission Failed:** {str(e)}"
|
msg.content = f"**Erro ao processar solicitação:** {str(e)}"
|
||||||
await msg.update()
|
await msg.update()
|
||||||
# Reset crew on failure so user can try again or get re-routed
|
# Reset crew on failure so user can try again or get re-routed
|
||||||
cl.user_session.set("selected_crew", None)
|
cl.user_session.set("selected_crew", None)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue