feat: initial implementation taller-wox.fitlabs.dev
Portal FastAPI + 5 endpoints REST para Bootcamp Agentic AI con watsonx Orchestrate (FactorIT). Single container, Coolify-ready. - Landing brandeado FIT con formulario de registro (honeypot anti-bot) - Tokens itsdangerous para descargas (24h expiry) - 5 endpoints API: historical/available procedures, member-insights, schedule, generate-report (Jinja2 + Plotly) - SQLite con upsert-on-email para leads + log de descargas - Admin endpoints (HTTP Basic): leads.json, leads.csv, stats - 23 tests pytest pasando - Dockerfile listo para Coolify con volúmenes persistentes (/app/leads.db, /app/app/data/reports_output, /app/material) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
0
material/.gitkeep
Normal file
0
material/.gitkeep
Normal file
91
material/LEEME.txt
Normal file
91
material/LEEME.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
==============================================================
|
||||
BOOTCAMP AGENTIC AI — watsonx Orchestrate
|
||||
Material de descarga del taller
|
||||
taller-wox.fitlabs.dev
|
||||
==============================================================
|
||||
|
||||
Hola. Aquí está todo lo que vas a necesitar durante el taller.
|
||||
Descarga TODOS los archivos en una carpeta llamada "bootcamp-fit"
|
||||
en tu Escritorio antes de empezar.
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
ARCHIVOS PRINCIPALES (los nombra el manual del alumno)
|
||||
----------------------------------------------------------------
|
||||
|
||||
1) openapi-tools-spec.json
|
||||
OpenAPI principal de AskBenefits (4 endpoints de salud).
|
||||
Lo importas en el módulo 2.
|
||||
|
||||
2) openapi-tools-spec.yaml
|
||||
Misma especificación pero en formato YAML.
|
||||
Úsalo solo si el .json te falla al subirlo.
|
||||
|
||||
3) dental_benefits_summary.pdf
|
||||
PDF que sube al Knowledge Base de AskDental (módulo 3).
|
||||
|
||||
4) openapi-tools-report.json
|
||||
OpenAPI del agente AskReporting (módulo 4).
|
||||
|
||||
5) main-desk-concierge-action.json
|
||||
Acción de watsonx Assistant (módulo 5, opcional).
|
||||
|
||||
6) bank-assistant-pack.zip
|
||||
YAMLs de los 6 agentes ADK + tools en Python
|
||||
(módulo 5, demo del instructor).
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
MATERIAL EXTRA (carpeta material-extra/)
|
||||
----------------------------------------------------------------
|
||||
|
||||
- manual-completo-bootcamp.pdf
|
||||
Manual oficial del bootcamp en PDF (referencia adicional,
|
||||
17 MB). Tiene todas las capturas originales del repositorio.
|
||||
|
||||
- askbenefits-lab.pdf
|
||||
Versión PDF del lab AskBenefits (en inglés).
|
||||
|
||||
- deck-ibm-agents.pptx
|
||||
Slides "Agents" de IBM, material teórico de soporte.
|
||||
|
||||
- paper-react-yao-2022.pdf
|
||||
Paper original de ReAct (Yao et al. 2022).
|
||||
Lectura recomendada después del taller.
|
||||
|
||||
- diagrama-arquitectura.png
|
||||
Diagrama de arquitectura del caso AskBenefits.
|
||||
|
||||
- RAG-Elastic.ipynb + qna.csv
|
||||
Notebook y dataset para experimentar con RAG en
|
||||
Elasticsearch (módulo 5, opcional).
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
NOTAS IMPORTANTES
|
||||
----------------------------------------------------------------
|
||||
|
||||
* Los textos de descripción de los agentes (los que copias
|
||||
al Agent Builder) están en INGLÉS dentro del manual del
|
||||
alumno. Esto es porque vienen del repositorio base. Si
|
||||
quieres, puedes traducirlos después.
|
||||
|
||||
* Los prompts de prueba en el manual del alumno están
|
||||
en ESPAÑOL.
|
||||
|
||||
* Si tu tool no responde y ves error de red, revisa con
|
||||
el instructor — los endpoints corren en infraestructura
|
||||
FIT Labs (taller-wox.fitlabs.dev/api).
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
SOPORTE
|
||||
----------------------------------------------------------------
|
||||
|
||||
Repositorio base original:
|
||||
github.com/leozangulo/agentic-bootcamp
|
||||
|
||||
Material del taller:
|
||||
taller-wox.fitlabs.dev
|
||||
|
||||
FactorIT · FIT
|
||||
BIN
material/dental_benefits_summary.pdf
Normal file
BIN
material/dental_benefits_summary.pdf
Normal file
Binary file not shown.
876
material/main-desk-concierge-action.json
Normal file
876
material/main-desk-concierge-action.json
Normal file
@@ -0,0 +1,876 @@
|
||||
{
|
||||
"name": "Main Desk Concierge-action",
|
||||
"type": "action",
|
||||
"counts": {
|
||||
"actions": 5,
|
||||
"intents": 2,
|
||||
"entities": 3,
|
||||
"data_types": 0,
|
||||
"collections": 0,
|
||||
"global_variables": 0
|
||||
},
|
||||
"status": "Available",
|
||||
"language": "en",
|
||||
"skill_id": "1744ee3b-f227-45b2-9848-98415cc3c872",
|
||||
"workspace": {
|
||||
"actions": [
|
||||
{
|
||||
"type": "standard",
|
||||
"steps": [
|
||||
{
|
||||
"step": "digression_failure",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "Sorry I couldn't confirm if you wanted to return to previous topic, let me connect to an agent."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "digression_failure",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "Failed to confirm topic return"
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_001"
|
||||
},
|
||||
{
|
||||
"step": "step_001",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "I'm afraid I don't understand. I can connect you to an agent."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "step_001",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "Step validation failed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_002"
|
||||
},
|
||||
{
|
||||
"step": "step_002",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "Sorry I couldn't assist you. I will connect you to an agent right away."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "step_002",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "Agent requested"
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_003"
|
||||
},
|
||||
{
|
||||
"step": "step_003",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "I am afraid I do not understand what you are asking, let me connect you to an agent."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "step_003",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "No action matches"
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_004"
|
||||
},
|
||||
{
|
||||
"step": "step_004",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "It seems this conversation would be best managed by a human agent. Let me connect you to one of our agents."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "step_004",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "Danger word detected"
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_005"
|
||||
},
|
||||
{
|
||||
"step": "step_005",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "It seems this conversation would be best managed by a human agent. Let me connect you to one of our agents."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "connect_to_agent",
|
||||
"response": {
|
||||
"transfer_info": {
|
||||
"target": {}
|
||||
},
|
||||
"agent_available": {
|
||||
"message": "Let's send you to an available agent."
|
||||
},
|
||||
"agent_unavailable": {
|
||||
"message": "There are no agents available at this time. When one becomes available, we'll connect you."
|
||||
},
|
||||
"message_to_human_agent": ""
|
||||
}
|
||||
},
|
||||
"variable": "step_005",
|
||||
"condition": {
|
||||
"eq": [
|
||||
{
|
||||
"system_variable": "fallback_reason"
|
||||
},
|
||||
{
|
||||
"scalar": "Profanity detected"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Fallback",
|
||||
"action": "fallback",
|
||||
"boosts": [],
|
||||
"handlers": [],
|
||||
"condition": {
|
||||
"intent": "fallback_connect_to_agent"
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "Topic return failed",
|
||||
"variable": "digression_failure",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "I'm afraid I don't understand. I can connect you to an agent.",
|
||||
"variable": "step_001",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "Sorry I couldn't assist you. I will connect you to an agent righ",
|
||||
"variable": "step_002",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "I am afraid I do not understand what you are asking, let me conn",
|
||||
"variable": "step_003",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "It seems this conversation would be best managed",
|
||||
"variable": "step_004",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "Profanity - It seems this conversation",
|
||||
"variable": "step_005",
|
||||
"data_type": "any"
|
||||
}
|
||||
],
|
||||
"next_action": "run_always",
|
||||
"disambiguation_opt_out": true
|
||||
},
|
||||
{
|
||||
"type": "standard",
|
||||
"steps": [
|
||||
{
|
||||
"step": "danger_word_detected",
|
||||
"title": "Connect to agent",
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "fallback"
|
||||
},
|
||||
"variable": "danger_word_detected_variable",
|
||||
"condition": {
|
||||
"entity": "danger_words"
|
||||
},
|
||||
"next_step": "profanity_detected"
|
||||
},
|
||||
{
|
||||
"step": "profanity_detected",
|
||||
"title": "Show warning",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "Please use appropriate language when interacting with the assistant."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [
|
||||
{
|
||||
"type": "max_hits",
|
||||
"handler": "max_hits_handler",
|
||||
"resolver": {
|
||||
"type": "fallback"
|
||||
}
|
||||
}
|
||||
],
|
||||
"max_hits": 2,
|
||||
"resolver": {
|
||||
"type": "end_action"
|
||||
},
|
||||
"variable": "profanity_detected_variable",
|
||||
"condition": {
|
||||
"entity": "profane_words"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Trigger word detected",
|
||||
"action": "run_always",
|
||||
"boosts": [],
|
||||
"handlers": [],
|
||||
"variables": [
|
||||
{
|
||||
"title": "Profanity detected",
|
||||
"variable": "danger_word_detected_variable",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "Profane word detected",
|
||||
"variable": "profanity_detected_variable",
|
||||
"data_type": "any"
|
||||
}
|
||||
],
|
||||
"next_action": "anything_else"
|
||||
},
|
||||
{
|
||||
"type": "standard",
|
||||
"steps": [
|
||||
{
|
||||
"step": "step_001",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "I'm afraid I don't understand. Please rephrase your question."
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "end_action"
|
||||
},
|
||||
"variable": "step_001",
|
||||
"condition": {
|
||||
"lte": [
|
||||
{
|
||||
"system_variable": "no_action_matches_count"
|
||||
},
|
||||
{
|
||||
"scalar": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"next_step": "step_002"
|
||||
},
|
||||
{
|
||||
"step": "step_002",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": ""
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "invoke_another_action_and_end",
|
||||
"invoke_action": {
|
||||
"action": "fallback",
|
||||
"policy": "default",
|
||||
"parameters": null,
|
||||
"result_variable": "step_002_result_1"
|
||||
}
|
||||
},
|
||||
"variable": "step_002",
|
||||
"condition": {
|
||||
"gt": [
|
||||
{
|
||||
"system_variable": "no_action_matches_count"
|
||||
},
|
||||
{
|
||||
"scalar": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "No matches",
|
||||
"action": "anything_else",
|
||||
"boosts": [],
|
||||
"handlers": [],
|
||||
"condition": {
|
||||
"expression": "anything_else"
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "I am afraid I do not understand what you are asking, please re-p",
|
||||
"variable": "step_001",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"variable": "step_002",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"variable": "step_002_result_1",
|
||||
"data_type": "any"
|
||||
}
|
||||
],
|
||||
"disambiguation_opt_out": true
|
||||
},
|
||||
{
|
||||
"type": "standard",
|
||||
"steps": [
|
||||
{
|
||||
"step": "step_001",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text": "Welcome, how can I assist you?"
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "end_action"
|
||||
},
|
||||
"variable": "step_001"
|
||||
}
|
||||
],
|
||||
"title": "Greet customer",
|
||||
"action": "welcome",
|
||||
"boosts": [],
|
||||
"handlers": [],
|
||||
"condition": {
|
||||
"expression": "welcome"
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"variable": "step_001",
|
||||
"data_type": "any"
|
||||
}
|
||||
],
|
||||
"next_action": "action_44900",
|
||||
"disambiguation_opt_out": true
|
||||
},
|
||||
{
|
||||
"type": "standard",
|
||||
"steps": [
|
||||
{
|
||||
"step": "step_356",
|
||||
"title": "Get Patients Name",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "Sure I can help you with that! What's your first and last name?"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"question": {
|
||||
"free_text": true
|
||||
},
|
||||
"resolver": {
|
||||
"type": "continue"
|
||||
},
|
||||
"variable": "step_356",
|
||||
"next_step": "step_572"
|
||||
},
|
||||
{
|
||||
"step": "step_572",
|
||||
"title": "Get Patients DOB",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "Thank you! Could you please confirm your date of birth for me?"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"question": {
|
||||
"free_text": true
|
||||
},
|
||||
"resolver": {
|
||||
"type": "continue"
|
||||
},
|
||||
"variable": "step_572",
|
||||
"next_step": "step_309"
|
||||
},
|
||||
{
|
||||
"step": "step_309",
|
||||
"title": "Conclusion",
|
||||
"output": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "Great I have all the information I need, and I am now ready to answer your questions!"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlers": [],
|
||||
"resolver": {
|
||||
"type": "end_action"
|
||||
},
|
||||
"variable": "step_309"
|
||||
}
|
||||
],
|
||||
"title": "Main Desk",
|
||||
"action": "action_44900",
|
||||
"boosts": [],
|
||||
"handlers": [],
|
||||
"condition": {
|
||||
"intent": "action_44900_intent_12533"
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "Conclusion",
|
||||
"privacy": {
|
||||
"enabled": false
|
||||
},
|
||||
"variable": "step_309",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "Get Patients Name",
|
||||
"privacy": {
|
||||
"enabled": false
|
||||
},
|
||||
"variable": "step_356",
|
||||
"data_type": "any"
|
||||
},
|
||||
{
|
||||
"title": "Get Patients DOB",
|
||||
"privacy": {
|
||||
"enabled": false
|
||||
},
|
||||
"variable": "step_572",
|
||||
"data_type": "any"
|
||||
}
|
||||
],
|
||||
"launch_mode": "learning",
|
||||
"next_action": "fallback",
|
||||
"topic_switch": {
|
||||
"allowed_from": true,
|
||||
"allowed_into": true,
|
||||
"never_return": false
|
||||
},
|
||||
"disambiguation_opt_out": false
|
||||
}
|
||||
],
|
||||
"intents": [
|
||||
{
|
||||
"intent": "fallback_connect_to_agent",
|
||||
"examples": [
|
||||
{
|
||||
"text": "Call agent"
|
||||
},
|
||||
{
|
||||
"text": "Agent help"
|
||||
},
|
||||
{
|
||||
"text": "I would like to speak to a human"
|
||||
},
|
||||
{
|
||||
"text": "Can I connect to an agent?"
|
||||
},
|
||||
{
|
||||
"text": "I would like to speak to someone"
|
||||
}
|
||||
],
|
||||
"description": "Please transfer me to an agent"
|
||||
},
|
||||
{
|
||||
"intent": "action_44900_intent_12533",
|
||||
"examples": [
|
||||
{
|
||||
"text": "I want to access my medical records"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"entities": [
|
||||
{
|
||||
"entity": "sys-yes-no",
|
||||
"values": []
|
||||
},
|
||||
{
|
||||
"entity": "danger_words",
|
||||
"values": [],
|
||||
"fuzzy_match": false
|
||||
},
|
||||
{
|
||||
"entity": "profane_words",
|
||||
"values": [],
|
||||
"fuzzy_match": false
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"api_version": {
|
||||
"major_version": "v2",
|
||||
"minor_version": "2018-11-08"
|
||||
},
|
||||
"skill": {
|
||||
"counts": {
|
||||
"actions": 5,
|
||||
"intents": 2,
|
||||
"entities": 3,
|
||||
"data_types": 0,
|
||||
"collections": 0,
|
||||
"global_variables": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": [],
|
||||
"data_types": [],
|
||||
"collections": [],
|
||||
"counterexamples": [],
|
||||
"system_settings": {
|
||||
"variable": {
|
||||
"format": {
|
||||
"time": {
|
||||
"pattern": "short"
|
||||
},
|
||||
"currency": {
|
||||
"fraction_digits": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"off_topic": {
|
||||
"enabled": true
|
||||
},
|
||||
"auto_learn": {
|
||||
"apply": true
|
||||
},
|
||||
"topic_switch": {
|
||||
"enabled": true,
|
||||
"messages": {
|
||||
"enable_confirmation": true,
|
||||
"confirmation_failure": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "I'm sorry, I did not catch that, please confirm."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
}
|
||||
]
|
||||
},
|
||||
"confirmation_request": {
|
||||
"generic": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"text_expression": {
|
||||
"concat": [
|
||||
{
|
||||
"scalar": "Do you want to continue with the previous topic: "
|
||||
},
|
||||
{
|
||||
"system_variable": "digressed_from"
|
||||
},
|
||||
{
|
||||
"scalar": "?"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "text",
|
||||
"selection_policy": "sequential"
|
||||
},
|
||||
{
|
||||
"options": [
|
||||
{
|
||||
"label": "Yes",
|
||||
"value": {
|
||||
"input": {
|
||||
"text": "Yes"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "No",
|
||||
"value": {
|
||||
"input": {
|
||||
"text": "No"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"response_type": "option",
|
||||
"repeat_on_reprompt": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"max_tries": 3
|
||||
},
|
||||
"generative_ai": {
|
||||
"model_id": "ibm/granite-3-8b-instruct",
|
||||
"hap_filter": {
|
||||
"output": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"disambiguation": {
|
||||
"prompt": "Did you mean:",
|
||||
"enabled": true,
|
||||
"randomize": true,
|
||||
"max_suggestions": 5,
|
||||
"suggestion_text_policy": "title",
|
||||
"none_of_the_above_prompt": "None of the above",
|
||||
"use_connect_to_support_prompt": "Connect to support",
|
||||
"single_answer_clarification_prompt": "Something else"
|
||||
},
|
||||
"search_routing": {
|
||||
"target": "conversational_search"
|
||||
},
|
||||
"spelling_auto_correct": true
|
||||
},
|
||||
"learning_opt_out": true,
|
||||
"language": "en"
|
||||
},
|
||||
"description": "created for assistant dfcdc7a1-4a37-4714-9189-daa085b3e4a9",
|
||||
"dialog_settings": {
|
||||
"source_assistant": "14184e97-fe24-4fc4-ae2a-addfb22e41c1"
|
||||
},
|
||||
"created": "2025-05-16T15:38:23.103Z",
|
||||
"updated": "2025-05-16T15:38:23.103Z",
|
||||
"snapshot": "1",
|
||||
"assistant_id": "dfcdc7a1-4a37-4714-9189-daa085b3e4a9",
|
||||
"assistant_references": [
|
||||
{
|
||||
"name": "Main Desk Concierge",
|
||||
"assistant_id": "14184e97-fe24-4fc4-ae2a-addfb22e41c1",
|
||||
"skill_reference": "actions skill"
|
||||
}
|
||||
]
|
||||
}
|
||||
624
material/material-extra/RAG-Elastic.ipynb
Normal file
624
material/material-extra/RAG-Elastic.ipynb
Normal file
@@ -0,0 +1,624 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "292fbf42",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/leozangulo/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020\n",
|
||||
" warnings.warn(\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from elasticsearch import Elasticsearch\n",
|
||||
"from elasticsearch.helpers import bulk\n",
|
||||
"from elasticsearch import exceptions as es_exceptions\n",
|
||||
"from langchain.embeddings import SentenceTransformerEmbeddings\n",
|
||||
"import pandas as pd\n",
|
||||
"import os"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "84e039f6",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"try:\n",
|
||||
" esuser = \"<USERNAME>\"\n",
|
||||
"except KeyError:\n",
|
||||
" esuser = input(\"Please enter your Elasticsearch user name (hit enter): \")\n",
|
||||
"try:\n",
|
||||
" espassword = \"<PASSWORD>\"\n",
|
||||
"except KeyError:\n",
|
||||
" espassword = getpass.getpass(\"Please enter your Elasticsearch password (hit enter): \")\n",
|
||||
"try:\n",
|
||||
" eshost = \"<ELASTIC_URL>\"\n",
|
||||
"except KeyError:\n",
|
||||
" eshost = input(\"Please enter your Elasticsearch hostname (hit enter): \")\n",
|
||||
"try:\n",
|
||||
" esport = \"XXXX\"\n",
|
||||
"except KeyError:\n",
|
||||
" esport = input(\"Please enter your Elasticsearch port number (hit enter): \")\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "cb563197",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'22:B8:75:5A:05:3F:6D:7D:D7:43:CB:07:63:41:0B:5B:B0:AC:2F:C9:9F:BF:8C:CE:3C:D4:42:5F:B0:92:E4:A9'"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"es_ssl_fingerprint = !openssl s_client -connect $eshost:$esport -showcerts </dev/null 2>/dev/null | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin\n",
|
||||
"es_ssl_fingerprint = es_ssl_fingerprint[0].split(\"=\")[1]\n",
|
||||
"es_ssl_fingerprint"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "aa36655c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"elastic_client = Elasticsearch([f\"https://{esuser}:{espassword}@{eshost}:{esport}\"],\n",
|
||||
" basic_auth=(esuser, espassword),\n",
|
||||
" request_timeout=None,\n",
|
||||
" ssl_assert_fingerprint=es_ssl_fingerprint)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "88d064ea-3ec8-49e4-b0ca-1c8c77b7def7",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Conexión exitosa. Info del clúster:\n",
|
||||
"{'name': 'm-1.63ae1f09-63d0-42c1-a834-11658d84d119.b3580ea2cd7943f795db3d4b2f063fc7.c5kmhkid0ujpmrucb800.databases.appdomain.cloud', 'cluster_name': '63ae1f09-63d0-42c1-a834-11658d84d119', 'cluster_uuid': '1OewP8bXSO2Y48FwiRaqeg', 'version': {'number': '8.15.0', 'build_flavor': 'default', 'build_type': 'tar', 'build_hash': '1a77947f34deddb41af25e6f0ddb8e830159c179', 'build_date': '2024-08-05T10:05:34.233336849Z', 'build_snapshot': False, 'lucene_version': '9.11.1', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Verificar que la conexión este creada\n",
|
||||
"try:\n",
|
||||
" info = elastic_client.info()\n",
|
||||
" print(\"Conexión exitosa. Info del clúster:\")\n",
|
||||
" print(info)\n",
|
||||
"except es_exceptions.AuthenticationException as e:\n",
|
||||
" print(\"Error de autenticación:\", e.info)\n",
|
||||
"except es_exceptions.ConnectionError as e:\n",
|
||||
" print(\"Error de conexión:\", e.info)\n",
|
||||
"except es_exceptions.AuthorizationException as e:\n",
|
||||
" print(\"Error de autorización:\", e.info)\n",
|
||||
"except es_exceptions.TransportError as e:\n",
|
||||
" print(\"Error general de transporte:\", e.info)\n",
|
||||
"except Exception as e:\n",
|
||||
" print(\"Otro error:\", str(e))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f856c004-8571-4e83-9a2f-1366c1f5b021",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Selección del modelo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "2cf5eb6c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/var/folders/h_/w76hwqrd6kv3q8ps8cm4_y980000gn/T/ipykernel_87367/2620494856.py:1: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 1.0. An updated version of the class exists in the :class:`~langchain-huggingface package and should be used instead. To use it run `pip install -U :class:`~langchain-huggingface` and import as `from :class:`~langchain_huggingface import HuggingFaceEmbeddings``.\n",
|
||||
" emb_func = SentenceTransformerEmbeddings(model_name=\"all-MiniLM-L6-v2\")\n",
|
||||
"/Users/leozangulo/Library/Python/3.9/lib/python/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
||||
" from .autonotebook import tqdm as notebook_tqdm\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"emb_func = SentenceTransformerEmbeddings(model_name=\"all-MiniLM-L6-v2\")\n",
|
||||
"dims = emb_func.client.get_sentence_embedding_dimension()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "7fdf69ae",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"ObjectApiResponse({'acknowledged': True, 'shards_acknowledged': True, 'index': 'test_nds_v2'})"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Creación del índice y del esquema\n",
|
||||
"index_name = \"test_nds_v2\"\n",
|
||||
"\n",
|
||||
"mapping = {\n",
|
||||
" \"properties\": {\n",
|
||||
" \"text\": {\n",
|
||||
" \"type\": \"text\"\n",
|
||||
" },\n",
|
||||
" \"embedding\": {\n",
|
||||
" \"type\": \"dense_vector\",\n",
|
||||
" \"dims\": dims,\n",
|
||||
" \"index\": True,\n",
|
||||
" \"similarity\": \"l2_norm\"\n",
|
||||
" }\n",
|
||||
" }\n",
|
||||
" }\n",
|
||||
"if elastic_client.indices.exists(index=index_name):\n",
|
||||
" elastic_client.indices.delete(index=index_name)\n",
|
||||
" \n",
|
||||
"elastic_client.indices.create(index=index_name, mappings=mapping)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0b58d667",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Definición de documentos"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "e498f6cf",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Seleccionar todos los .txt\n",
|
||||
"scl = []\n",
|
||||
"for file in os.listdir(\"./\"):\n",
|
||||
" if file.endswith(\".txt\"):\n",
|
||||
" print(os.path.join(file))\n",
|
||||
" scl.append(file)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"id": "a78ea9a7-29f3-4094-a5f3-feb9035ece14",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>resumen</th>\n",
|
||||
" <th>Compositor</th>\n",
|
||||
" <th>Pregunta</th>\n",
|
||||
" <th>Respuesta</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Dónde nació Mozart?, ...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Dónde nació Mozart?</td>\n",
|
||||
" <td>Mozart nació en Salzburgo, que en su época era...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿A qué edad empezó a c...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿A qué edad empezó a componer?</td>\n",
|
||||
" <td>Comenzó a componer desde los 5 años, escribien...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Cuál es su nombre com...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Cuál es su nombre completo?</td>\n",
|
||||
" <td>Su nombre completo era Johannes Chrysostomus W...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Qué significa “Amadeu...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Qué significa “Amadeus”?</td>\n",
|
||||
" <td>Significa 'amado de Dios' en latín, aunque tam...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Qué famosa ópera comp...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Qué famosa ópera compuso en 1786?</td>\n",
|
||||
" <td>Compuso 'Las bodas de Fígaro' (Le nozze di Fig...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Cuál es su ópera cons...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Cuál es su ópera considerada la más oscura y ...</td>\n",
|
||||
" <td>Sin duda 'Don Giovanni', que mezcla comedia y ...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Qué obra dejó inconcl...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Qué obra dejó inconclusa al morir?</td>\n",
|
||||
" <td>Su famoso Réquiem en Re menor, que estaba comp...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿Quién terminó su Réqu...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿Quién terminó su Réquiem?</td>\n",
|
||||
" <td>Fue su alumno Franz Xaver Süssmayr, quien comp...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿En qué ciudad murió M...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿En qué ciudad murió Mozart?</td>\n",
|
||||
" <td>Murió en Viena, la capital de Austria, donde p...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>Tema: Mozart, Pregunta: ¿A qué edad murió?, Re...</td>\n",
|
||||
" <td>Mozart</td>\n",
|
||||
" <td>¿A qué edad murió?</td>\n",
|
||||
" <td>Murió muy joven, a los 35 años, dejando más de...</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" resumen Compositor \\\n",
|
||||
"0 Tema: Mozart, Pregunta: ¿Dónde nació Mozart?, ... Mozart \n",
|
||||
"1 Tema: Mozart, Pregunta: ¿A qué edad empezó a c... Mozart \n",
|
||||
"2 Tema: Mozart, Pregunta: ¿Cuál es su nombre com... Mozart \n",
|
||||
"3 Tema: Mozart, Pregunta: ¿Qué significa “Amadeu... Mozart \n",
|
||||
"4 Tema: Mozart, Pregunta: ¿Qué famosa ópera comp... Mozart \n",
|
||||
"5 Tema: Mozart, Pregunta: ¿Cuál es su ópera cons... Mozart \n",
|
||||
"6 Tema: Mozart, Pregunta: ¿Qué obra dejó inconcl... Mozart \n",
|
||||
"7 Tema: Mozart, Pregunta: ¿Quién terminó su Réqu... Mozart \n",
|
||||
"8 Tema: Mozart, Pregunta: ¿En qué ciudad murió M... Mozart \n",
|
||||
"9 Tema: Mozart, Pregunta: ¿A qué edad murió?, Re... Mozart \n",
|
||||
"\n",
|
||||
" Pregunta \\\n",
|
||||
"0 ¿Dónde nació Mozart? \n",
|
||||
"1 ¿A qué edad empezó a componer? \n",
|
||||
"2 ¿Cuál es su nombre completo? \n",
|
||||
"3 ¿Qué significa “Amadeus”? \n",
|
||||
"4 ¿Qué famosa ópera compuso en 1786? \n",
|
||||
"5 ¿Cuál es su ópera considerada la más oscura y ... \n",
|
||||
"6 ¿Qué obra dejó inconclusa al morir? \n",
|
||||
"7 ¿Quién terminó su Réquiem? \n",
|
||||
"8 ¿En qué ciudad murió Mozart? \n",
|
||||
"9 ¿A qué edad murió? \n",
|
||||
"\n",
|
||||
" Respuesta \n",
|
||||
"0 Mozart nació en Salzburgo, que en su época era... \n",
|
||||
"1 Comenzó a componer desde los 5 años, escribien... \n",
|
||||
"2 Su nombre completo era Johannes Chrysostomus W... \n",
|
||||
"3 Significa 'amado de Dios' en latín, aunque tam... \n",
|
||||
"4 Compuso 'Las bodas de Fígaro' (Le nozze di Fig... \n",
|
||||
"5 Sin duda 'Don Giovanni', que mezcla comedia y ... \n",
|
||||
"6 Su famoso Réquiem en Re menor, que estaba comp... \n",
|
||||
"7 Fue su alumno Franz Xaver Süssmayr, quien comp... \n",
|
||||
"8 Murió en Viena, la capital de Austria, donde p... \n",
|
||||
"9 Murió muy joven, a los 35 años, dejando más de... "
|
||||
]
|
||||
},
|
||||
"execution_count": 45,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"documents_filename = \"./qna.csv\"\n",
|
||||
"documents = pd.read_csv(documents_filename, header=0)\n",
|
||||
"c = documents['Compositor']\n",
|
||||
"p = documents['Pregunta']\n",
|
||||
"r = documents['Respuesta']\n",
|
||||
"documents['resumen'] = 'Tema: '+c+', Pregunta: '+p+', Respuesta: '+r\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"cols = documents.columns.tolist()\n",
|
||||
"cols = ['resumen'] + [col for col in cols if col != 'resumen']\n",
|
||||
"documents = documents[cols]\n",
|
||||
"\n",
|
||||
"documents[:10]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 46,
|
||||
"id": "6e1c4696",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"texts = documents.resumen.tolist()\n",
|
||||
"embedded_docs = emb_func.embed_documents(texts)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 58,
|
||||
"id": "2f52cc78",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"test_nds_v2\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"ObjectApiResponse({'_shards': {'total': 2, 'successful': 2, 'failed': 0}})"
|
||||
]
|
||||
},
|
||||
"execution_count": 58,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Guardar los documentos en la DB\n",
|
||||
"for i, (text, vector) in enumerate(zip(texts, embedded_docs)):\n",
|
||||
" document_l = {\"embedding\": vector, 'text': text}\n",
|
||||
" elastic_client.index(index=index_name, document=document_l)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"elastic_client.indices.refresh(index=index_name)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 60,
|
||||
"id": "7110e733-5e33-4a07-908b-790a9a67ad25",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"📊 El índice '.ent-search-actastic-oauth_access_tokens_v2' tiene 50 documentos.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Mostrar cantidad de indices\n",
|
||||
"try:\n",
|
||||
" response = elastic_client.count(index=\"test_nds_v2\")\n",
|
||||
" total_docs = response['count']\n",
|
||||
" print(f\"📊 El índice '{indice}' tiene {total_docs} documentos.\")\n",
|
||||
"except Exception as e:\n",
|
||||
" print(\"❌ Error al obtener el conteo:\", e)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "1a460246-f99d-46f4-bdf1-d8dd7a20ddfd",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#document_list"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 54,
|
||||
"id": "9332a307-e2f6-4d7d-a094-38547e85373b",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"📊 El índice '.ent-search-actastic-oauth_access_tokens_v2' tiene 0 documentos.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"try:\n",
|
||||
" response = elastic_client.count(index=\"test_nds_v2\")\n",
|
||||
" total_docs = response['count']\n",
|
||||
" print(f\"📊 El índice '{indice}' tiene {total_docs} documentos.\")\n",
|
||||
"except Exception as e:\n",
|
||||
" print(\"❌ Error al obtener el conteo:\", e)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 63,
|
||||
"id": "19a46065-a48b-425e-8a89-cb0089748220",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"- .ent-search-actastic-workplace_search_accounts_v16\n",
|
||||
"- .ent-search-actastic-workplace_search_search_groups_v4-name-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler2_robots_txts\n",
|
||||
"- .ent-search-actastic-workplace_search_pre_content_sources_v3\n",
|
||||
"- .ent-search-actastic-crawler_crawl_requests_v7\n",
|
||||
"- .ent-search-esqueues-me_queue_v1_process_crawl2\n",
|
||||
"- .ent-search-actastic-reindex_jobs_v3\n",
|
||||
"- .ent-search-actastic-workplace_search_role_mappings_v8\n",
|
||||
"- .kibana_8.15.0_001\n",
|
||||
"- .ent-search-actastic-search_relevance_suggestion_update_process_v1\n",
|
||||
"- .apm-custom-link\n",
|
||||
"- .ent-search-actastic-connectors_jobs_v5\n",
|
||||
"- .ml-annotations-000001\n",
|
||||
"- .ent-search-actastic-workplace_search_content_sources_v23\n",
|
||||
"- .internal.alerts-observability.uptime.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-users_v7-auth_source-elasticsearch_username-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler_process_crawls\n",
|
||||
"- .apm-source-map\n",
|
||||
"- .ent-search-actastic-users_v7-email-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler2_configurations_v2-index_name-unique-constraint\n",
|
||||
"- .slo-observability.summary-v3.3.temp\n",
|
||||
"- .ent-search-actastic-app_search_api_tokens_v3-authentication_token-unique-constraint\n",
|
||||
"- .ent-search-actastic-workplace_search_organizations_v17\n",
|
||||
"- .ent-search-actastic-search_indices_v1\n",
|
||||
"- .ent-search-actastic-app_search_crawler_content_url_metadata\n",
|
||||
"- .elastic-connectors-sync-jobs-v1\n",
|
||||
"- .ent-search-esqueues-me_queue_v1_process_crawl\n",
|
||||
"- .kibana_task_manager_8.15.0_001\n",
|
||||
"- .ent-search-actastic-crawler2_content_metadata-configuration_oid-content_hash-unique-constraint\n",
|
||||
"- .ent-search-esqueues-me_worker_v1\n",
|
||||
"- .ent-search-actastic-engines_v26\n",
|
||||
"- .ml-notifications-000002\n",
|
||||
"- .internal.alerts-transform.health.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-app_search_api_token_engines\n",
|
||||
"- .internal.alerts-observability.apm.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-crawler2_domains-configuration_oid-name-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler2_configurations_v2\n",
|
||||
"- .ent-search-actastic-crawler2_content_metadata\n",
|
||||
"- .ent-search-esqueues-me_queue_v1_mailer\n",
|
||||
"- .kibana_security_solution_8.15.0_001\n",
|
||||
"- .internal.alerts-security.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-workplace_search_pre_content_sources_v3-context-workplace_search_account_id-service_type-unique-constraint\n",
|
||||
"- .ent-search-actastic-secret_keeper_secrets\n",
|
||||
"- .ent-search-actastic-crawler_domains_v6\n",
|
||||
"- .internal.alerts-observability.logs.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-oauth_access_tokens_v2-token-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler2_process_crawls\n",
|
||||
"- .ent-search-actastic-crawler2_content_url_metadata\n",
|
||||
"- .ent-search-actastic-app_search_role_mapping_engines_v4\n",
|
||||
"- .ent-search-actastic-oauth_applications_v2\n",
|
||||
"- .ent-search-actastic-oauth_applications_v2-uid-unique-constraint\n",
|
||||
"- .ent-search-actastic-search_relevance_suggestions-document_position_id-unique-constraint\n",
|
||||
"- .kibana-observability-ai-assistant-kb-000001\n",
|
||||
"- .ent-search-esqueues-me_queue_v1_engine_destroyer\n",
|
||||
"- .ent-search-actastic-app_search_crawler_content_metadata-content_hash-engine_oid-unique-constraint\n",
|
||||
"- .ent-search-actastic-app_search_document_positions_v3\n",
|
||||
"- .ent-search-db-lock-20200304\n",
|
||||
"- .ent-search-actastic-oauth_access_grants_v2\n",
|
||||
"- .kibana_alerting_cases_8.15.0_001\n",
|
||||
"- .slo-observability.sli-v3.3\n",
|
||||
"- .internal.alerts-ml.anomaly-detection.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-synonyms\n",
|
||||
"- .kibana_security_session_1\n",
|
||||
"- .internal.alerts-observability.slo.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-crawler_domains_v6-engine_oid-name-unique-constraint\n",
|
||||
"- .ent-search-actastic-workplace_search_content_source_user_identities_v4\n",
|
||||
"- .internal.alerts-observability.metrics.alerts-default-000001\n",
|
||||
"- .kibana_ingest_8.15.0_001\n",
|
||||
"- .ent-search-actastic-workplace_search_api_tokens\n",
|
||||
"- .ent-search-actastic-telemetry_status_v3\n",
|
||||
"- .internal.alerts-stack.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-togo_migrations_v1\n",
|
||||
"- .apm-agent-configuration\n",
|
||||
"- .ent-search-actastic-app_search_crawler_content_metadata\n",
|
||||
"- .kibana-observability-ai-assistant-conversations-000001\n",
|
||||
"- .ent-search-actastic-crawler2_domains\n",
|
||||
"- .ent-search-actastic-search_relevance_suggestions\n",
|
||||
"- .internal.alerts-observability.threshold.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-users_v7\n",
|
||||
"- .ent-search-actastic-workplace_search_search_groups_v4\n",
|
||||
"- .ent-search-actastic-app_search_invitations_v3\n",
|
||||
"- .ent-search-actastic-engines_v26-loco_moco_account_id-slug-unique-constraint\n",
|
||||
"- .internal.alerts-default.alerts-default-000001\n",
|
||||
"- .internal.alerts-ml.anomaly-detection-health.alerts-default-000001\n",
|
||||
"- .ent-search-actastic-crawler2_crawl_requests_v2\n",
|
||||
"- .ent-search-actastic-app_search_document_position_queries_v4\n",
|
||||
"- .ent-search-actastic-oauth_access_tokens_v2-refresh_token-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler2_extraction_rules\n",
|
||||
"- .ent-search-actastic-app_search_api_tokens_v3\n",
|
||||
"- .slo-observability.summary-v3.3\n",
|
||||
"- .ent-search-actastic-workplace_search_invitations_v3\n",
|
||||
"- .kibana_analytics_8.15.0_001\n",
|
||||
"- .ent-search-actastic-workplace_search_accounts_v16-user_oid-unique-constraint\n",
|
||||
"- .ent-search-actastic-crawler_robots_txts_v3\n",
|
||||
"- test_nds_v2\n",
|
||||
"- test_nds\n",
|
||||
"- .ent-search-actastic-app_search_accounts_v11\n",
|
||||
"- .ent-search-actastic-app_search_role_mappings_v5\n",
|
||||
"- .ent-search-actastic-oauth_access_tokens_v2\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Ver cuantos indices hay\n",
|
||||
"indices = elastic_client.indices.get_alias(index=\"*\").keys()\n",
|
||||
"for indice in indices:\n",
|
||||
" print(\"-\", indice)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
BIN
material/material-extra/askbenefits-lab.pdf
Normal file
BIN
material/material-extra/askbenefits-lab.pdf
Normal file
Binary file not shown.
BIN
material/material-extra/deck-ibm-agents.pptx
Normal file
BIN
material/material-extra/deck-ibm-agents.pptx
Normal file
Binary file not shown.
BIN
material/material-extra/diagrama-arquitectura.png
Normal file
BIN
material/material-extra/diagrama-arquitectura.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
material/material-extra/manual-completo-bootcamp.pdf
Normal file
BIN
material/material-extra/manual-completo-bootcamp.pdf
Normal file
Binary file not shown.
BIN
material/material-extra/paper-react-yao-2022.pdf
Normal file
BIN
material/material-extra/paper-react-yao-2022.pdf
Normal file
Binary file not shown.
51
material/material-extra/qna.csv
Normal file
51
material/material-extra/qna.csv
Normal file
@@ -0,0 +1,51 @@
|
||||
Compositor,Pregunta,Respuesta
|
||||
Mozart,¿Dónde nació Mozart?,"Mozart nació en Salzburgo, que en su época era un arzobispado independiente y hoy es parte de Austria. Fue ahí donde creció rodeado de música gracias a su padre Leopold."
|
||||
Mozart,¿A qué edad empezó a componer?,"Comenzó a componer desde los 5 años, escribiendo pequeñas piezas para teclado que asombraban por su armonía y estructura pese a su corta edad."
|
||||
Mozart,¿Cuál es su nombre completo?,"Su nombre completo era Johannes Chrysostomus Wolfgangus Theophilus Mozart, aunque usaba Wolfgang Amadeus Mozart para presentarse profesionalmente."
|
||||
Mozart,¿Qué significa “Amadeus”?,"Significa 'amado de Dios' en latín, aunque también usaba la versión alemana 'Gottlieb' y la francesa 'Amadé' en cartas y partituras."
|
||||
Mozart,¿Qué famosa ópera compuso en 1786?,"Compuso 'Las bodas de Fígaro' (Le nozze di Figaro), considerada una de las mayores óperas cómicas de la historia musical."
|
||||
Mozart,¿Cuál es su ópera considerada la más oscura y profunda?,"Sin duda 'Don Giovanni', que mezcla comedia y drama con tintes filosóficos sobre el pecado, la libertad y la muerte."
|
||||
Mozart,¿Qué obra dejó inconclusa al morir?,"Su famoso Réquiem en Re menor, que estaba componiendo por encargo cuando falleció repentinamente en 1791."
|
||||
Mozart,¿Quién terminó su Réquiem?,"Fue su alumno Franz Xaver Süssmayr, quien completó los movimientos faltantes para poder entregar la obra terminada."
|
||||
Mozart,¿En qué ciudad murió Mozart?,"Murió en Viena, la capital de Austria, donde pasó sus últimos años componiendo sinfonías, óperas y su Réquiem."
|
||||
Mozart,¿A qué edad murió?,"Murió muy joven, a los 35 años, dejando más de 600 obras maestras que marcaron la historia de la música."
|
||||
Mozart,¿Cómo murió?,"La causa exacta sigue siendo debatida, pero la teoría más aceptada es fiebre reumática o infección renal, descartando el mito de envenenamiento."
|
||||
Mozart,¿Cuál era su relación con su padre Leopold?,"Era cercana pero también tensa; Leopold controlaba su carrera y vida personal, mientras Mozart quería independencia."
|
||||
Mozart,¿Mozart fue famoso en vida?,"Sí, era admirado en Europa como niño prodigio y compositor, aunque enfrentó problemas financieros en sus últimos años por su estilo de vida y falta de ahorros."
|
||||
Mozart,¿Cuál fue su primera sinfonía?,"La Sinfonía No. 1 en Mi bemol mayor, K.16, compuesta cuando tenía solo 8 años, demostrando su talento precoz."
|
||||
Mozart,¿Cuál es su sinfonía más famosa?,"La Sinfonía No. 40 en Sol menor, conocida por su energía dramática y belleza melódica que sigue impactando al público."
|
||||
Mozart,¿Cuál es su última sinfonía?,"La Sinfonía No. 41 'Júpiter', considerada su sinfonía más grandiosa y compleja en estructura polifónica."
|
||||
Mozart,¿Qué pieza para piano es muy popular de Mozart?,"El 'Rondo Alla Turca' (Marcha Turca) de su Sonata K.331, que imita la percusión turca muy de moda en su época."
|
||||
Mozart,¿Con qué estilo musical se asocia Mozart?,"Es uno de los máximos representantes del clasicismo vienés, caracterizado por equilibrio, claridad y elegancia formal."
|
||||
Mozart,¿Tocaba algún instrumento además del piano?,"Sí, además de ser virtuoso al piano, tocaba muy bien el violín desde niño, enseñado por su padre."
|
||||
Mozart,¿Con qué frase se le suele describir?,Se le llama 'genio musical precoz' por su dominio de la composición desde edad temprana y su obra inmensa en tan pocos años.
|
||||
Beethoven,¿Dónde nació Beethoven?,"Nació en Bonn, Alemania, en el seno de una familia de músicos que impulsaron su carrera desde pequeño."
|
||||
Beethoven,¿Qué problema de salud tuvo en su vida adulta?,"Sufrió sordera progresiva hasta quedar completamente sordo en sus últimos años, lo cual no detuvo su genialidad."
|
||||
Beethoven,¿Cuál es su obra más famosa?,"La Sinfonía No. 9 en Re menor, famosa por su cuarto movimiento con la 'Oda a la Alegría', hoy himno de la Unión Europea."
|
||||
Beethoven,¿Cómo se llama su única ópera?,"Fidelio, que trata sobre la libertad, la justicia y el amor conyugal, temas profundos para él."
|
||||
Beethoven,¿Qué edad tenía cuando empezó a perder audición?,"Empezó a notar problemas auditivos a los 28 años, lo que le causó gran depresión y aislamiento social."
|
||||
Beethoven,¿Cuál es su sonata para piano más famosa?,"La Sonata No. 14, conocida como 'Claro de Luna', evocadora y profundamente emotiva."
|
||||
Beethoven,¿Qué representa su Sinfonía No. 3 “Heroica”?,"Es un canto a la heroicidad y el idealismo humano, inicialmente dedicada a Napoleón hasta que se coronó emperador."
|
||||
Beethoven,¿Por qué retiró la dedicatoria a Napoleón?,"Porque Beethoven lo admiraba como libertador, pero al proclamarse emperador lo consideró traidor a los ideales republicanos."
|
||||
Beethoven,¿Cuál fue su última sinfonía?,"La Novena Sinfonía, con su revolucionario final coral y mensaje universal de fraternidad."
|
||||
Beethoven,¿Qué gran innovación introdujo en la Sinfonía No. 9?,"Fue la primera sinfonía en incluir coro y solistas vocales, rompiendo esquemas clásicos."
|
||||
Beethoven,¿Con qué estilo musical se le asocia?,"Es considerado un puente entre el clasicismo de Mozart y Haydn y el romanticismo de Liszt, Schumann y Wagner."
|
||||
Beethoven,¿A qué edad murió?,"Murió a los 56 años tras años de enfermedades, pero dejando un legado inmortal."
|
||||
Beethoven,¿De qué murió Beethoven?,"Principalmente de cirrosis hepática y complicaciones renales, probablemente exacerbadas por su estilo de vida y medicación."
|
||||
Beethoven,¿Tocaba algún instrumento?,Era un pianista virtuoso y también tocaba el órgano y la viola cuando era joven.
|
||||
Beethoven,¿Cuál fue su maestro más influyente?,"Joseph Haydn, aunque tuvieron diferencias creativas, Haydn reconoció su genialidad."
|
||||
Beethoven,¿Cómo era su carácter?,"Tenía un temperamento fuerte, independiente y a veces explosivo, pero era muy sensible y comprometido con su arte."
|
||||
Beethoven,¿Cómo se llama su testamento personal y filosófico?,"El Testamento de Heiligenstadt, carta donde expresa su desesperación por la sordera y su decisión de seguir viviendo por su arte."
|
||||
Beethoven,¿En qué ciudad murió?,"Murió en Viena, donde pasó la mayor parte de su vida como compositor y pianista."
|
||||
Beethoven,¿Qué pieza para piano expresa su frustración y lucha?,"La Sonata No. 8 'Patética', llena de contrastes dramáticos y ternura."
|
||||
Beethoven,¿Cómo se llama la pieza breve que se cree compuso para una mujer llamada Therese?,"Für Elise, pieza de dificultad media que se ha vuelto un clásico de aprendizaje pianístico."
|
||||
Liszt,¿Dónde nació Liszt?,"Nació en Raiding, un pueblo húngaro que hoy pertenece a Austria, y desde joven mostró virtuosismo al piano."
|
||||
Liszt,¿Qué fue Liszt además de compositor?,"Fue el pianista más famoso de su tiempo, director de orquesta, maestro y promotor de otros músicos."
|
||||
Liszt,¿Qué técnica pianística se le atribuye haber perfeccionado?,"Elevó el recital de piano a un espectáculo con sus innovadoras técnicas de arpegios, octavas rápidas y transcripciones orquestales."
|
||||
Liszt,¿Qué significa “Lisztomanía”?,Era el término para describir la histeria colectiva y adoración casi idolátrica que causaba en sus conciertos.
|
||||
Liszt,¿Cuál es su obra pianística más famosa?,"La Sonata en Si menor, considerada una cumbre pianística, junto con sus Estudios Trascendentales por su dificultad y expresividad."
|
||||
Liszt,¿Qué relación tuvo con Wagner?,"Fue suegro de Wagner y gran promotor de su música, aunque su relación fue compleja y distante por épocas."
|
||||
Liszt,¿Qué hizo Liszt en su madurez?,"Se retiró parcialmente de los escenarios y se ordenó como abad, dedicándose a la música religiosa y pedagógica."
|
||||
Liszt,¿Cuál es su poema sinfónico más famoso?,"Les Préludes, una obra que ejemplifica su desarrollo del poema sinfónico como género musical."
|
||||
Liszt,¿Con qué estilo musical se le asocia?,"Con el romanticismo, destacando por su pasión, virtuosismo y creación del poema sinfónico."
|
||||
Liszt,¿A qué edad murió y dónde?,"Murió a los 74 años en Bayreuth, Alemania, durante el festival de ópera organizado por Wagner."
|
||||
|
72
material/openapi-tools-report.json
Normal file
72
material/openapi-tools-report.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Report API",
|
||||
"version": "2.0.0",
|
||||
"description": "Tools for generating HTML reports with WxO"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://taller-wox.fitlabs.dev/api/reports/"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/generate-report": {
|
||||
"post": {
|
||||
"summary": "Generate Performance Report",
|
||||
"description": "This API generates a custom HTML performance report using predefined or user-defined layout sections.\n\n### How It Works\nThe input is a JSON-encoded list (`layout_config`) that specifies the structure of the report. Each item in the list must be one of:\n\n1. A **string**, such as \"care_report\", referring to a predefined layout preset.\n2. A **dictionary**, with:\n - `element_type`: The name of the registered element (e.g., `header`, `overview`).\n - `parameters`: A dictionary of arguments for that element function.\n\n### Predefined Presets\n- \"care_report\": A ready-to-use layout including a report header, overview generated by a language model, a claim review chart, and a data table from a CSV file.\n\n### Available Element Types\n\n#### ✅ `header`\n- **Description**: Creates a centered H2 title.\n- **Parameters**:\n - `title` (string, required): Text to display in the header.\n- **Example**:\n ```json\n {\n \"element_type\": \"header\",\n \"parameters\": {\n \"title\": \"Monthly Summary\"\n }\n }\n ```\n\n#### ✅ `overview`\n- **Description**: Uses a prompt + text file to generate a markdown-based summary via a language model.\n- **Parameters**:\n - `prompt` (string, required): Prompt prepended to the file contents.\n - `text_file` (string, required): Path to the `.txt` file to append to the prompt.\n - `title` (string, required): Display title for the section.\n- **Example**:\n ```json\n {\n \"element_type\": \"overview\",\n \"parameters\": {\n \"prompt\": \"Summarize customer sentiment: \",\n \"text_file\": \"./data/combined_email.txt\",\n \"title\": \"Customer Overview\"\n }\n }\n ```\n\n#### ✅ `claim_review_chart`\n- **Description**: Visualizes synthetic insurance payment breakdowns for multiple CPT codes.\n- **Parameters**: none required\n- **Example**:\n ```json\n {\n \"element_type\": \"claim_review_chart\",\n \"parameters\": {}\n }\n ```\n\n#### ✅ `table`\n- **Description**: Renders a CSV as a Plotly HTML table.\n- **Parameters**:\n - `csv_file` (string, required): Path to the `.csv` file.\n - `title` (string, required): Title for the visualization.\n- **Example**:\n ```json\n {\n \"element_type\": \"table\",\n \"parameters\": {\n \"csv_file\": \"./data/aetna_claim_review_summary.csv\",\n \"title\": \"Claim Review Table\"\n }\n }\n ```\n\n### 🧩 Layout Input Format\n- You may nest arrays or mix strings and dictionaries.\n- Only one level of nesting is resolved.\n- Final structure is flattened and rendered in order.\n\n### 🚨 File Usage Rules\n- Files must be located in the `./data/` directory.\n- Approved file types and paths:\n - `.txt`: For use with `overview`\n - `./data/combined_email.txt`\n - `./data/provider_email.txt`\n - `./data/aetna_email.txt`\n - `.csv`: For use with `table`\n - `./data/aetna_claim_review_summary.csv`\n\n⚠️ Do not reuse or cross-reference files across incompatible element types.\n\n### 🔁 Example Full Report Layout\n```json\n[\n \"care_report\",\n {\n \"element_type\": \"header\",\n \"parameters\": { \"title\": \"End of Report\" }\n }\n]\n```",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"layout_config": {
|
||||
"type": "string",
|
||||
"description": "A JSON-encoded string representing a list of section keys and/or custom report elements."
|
||||
}
|
||||
},
|
||||
"required": ["layout_config"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The HTML report was successfully generated and uploaded.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"public_url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"example": "https://your-bucket.cloud-object-storage.appdomain.cloud/reports/report.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "An error occurred while generating the report.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"detail": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
146
material/openapi-tools-spec.json
Normal file
146
material/openapi-tools-spec.json
Normal file
@@ -0,0 +1,146 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "BenefitsAgent Tools",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://taller-wox.fitlabs.dev/api/",
|
||||
"description": "Local development server"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/historical-procedures": {
|
||||
"post": {
|
||||
"summary": "This tool enables intelligent analysis and summarization of the historical procedures dataset.",
|
||||
"description": "This tool enables intelligent analysis and summarization of the historical procedures dataset.\n### Key Features\n- Filtering on any combination of columns\n- Grouping and aggregation of results\n### Dataset Overview\nDetected columns:\n- **member_name**: e.g., Alice, Bob, Charlie...\n- **relationship**: e.g., Mother, Father, Son...\n- **age**: e.g., 42, 45, 12...\n- **gender**: e.g., Female, Male\n- **procedure**: e.g., Annual Physical Exam, Appendectomy, CT Scan...\n- **procedure_type**: e.g., preventive, surgery, diagnostic...\n- **location**: e.g., City Hospital, Green Valley Clinic, Sunrise Health...\n- **date**: e.g., 2024-04-28, 2023-05-02, 2022-05-11...\n- **in_network**: e.g., True, False\n- **member_plan**: e.g., Gold PPO, Family Plan - Silver EPO\n- **accepted_plans**: e.g., Gold PPO, Family Plan - Silver EPO, Medicare Advantage, Gold PPO, Family Plan - Silver EPO, Family Plan - Silver EPO, Medicare Advantage...\n- **cost_facility**: e.g., 29.4, 48.02, 30.8...\n- **cost_physician**: e.g., 199.09, 189.75, 128.9...\n- **cost_anesthesia**: e.g., 0.0, 2024.21, 2257.4...\n- **cost_medication**: e.g., 4.19, 5.53, 7.15...\n- **total_cost**: e.g., 232.68, 243.3, 166.85...\n- **facility_rating**: e.g., 4.7, 4.5, 4.6...\n- **notes**: e.g., Annual Physical Exam performed at City Hospital., Appendectomy performed at City Hospital., CT Scan performed at Green Valley Clinic....\n### Example Input:\n```json\n{\"filters\": [{\"column\": \"member_name\", \"operator\": \"equals\", \"value\": \"Alice\"}]}\n```\nExample Questions:\n- \"What rows match member_name = Alice?\" \u2192 `{\"filters\": [{\"column\": \"member_name\", \"operator\": \"equals\", \"value\": \"Alice\"}]}`",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProcedureQuery"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful result",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/available-procedures": {
|
||||
"post": {
|
||||
"summary": "This tool enables intelligent analysis and summarization of the available procedures dataset.",
|
||||
"description": "This tool enables intelligent analysis and summarization of the available procedures dataset.\n### Key Features\n- Filtering on any combination of columns\n- Grouping and aggregation of results\n### Dataset Overview\nDetected columns:\n- **procedure**: e.g., Angioplasty, Annual Physical Exam, Appendectomy...",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ProcedureQuery"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful result",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/member-insights": {
|
||||
"get": {
|
||||
"summary": "Returns member data including plan information and overdue procedures.",
|
||||
"description": "Returns member data including:\n- Plan information (medical, pharmacy, mental health, wellness, tax documents)\n- Overdue preventive procedures",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Member profile and plan data",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/schedule": {
|
||||
"get": {
|
||||
"summary": "Provides appointment scheduling guidance.",
|
||||
"description": "Provides appointment scheduling guidelines to help users arrange medical visits through a live scheduling system.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Synthetic appointment instructions",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"ProcedureQuery": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filters": {
|
||||
"type": "string",
|
||||
"description": "JSON-encoded list of filter objects",
|
||||
"example": "[{\"column\": \"procedure\", \"operator\": \"equals\", \"value\": \"X ray\"}]"
|
||||
},
|
||||
"group_by": {
|
||||
"type": "string",
|
||||
"description": "JSON-encoded list of columns to group by",
|
||||
"example": "[\"facility_rating\"]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
355
material/openapi-tools-spec.yaml
Normal file
355
material/openapi-tools-spec.yaml
Normal file
@@ -0,0 +1,355 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: BenefitsAgent Tools
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://taller-wox.fitlabs.dev/api
|
||||
description: Local development server
|
||||
paths:
|
||||
/historical-procedures:
|
||||
post:
|
||||
summary: This tool enables intelligent analysis and summarization of the historical
|
||||
procedures dataset.
|
||||
description: |-
|
||||
This tool enables intelligent analysis and summarization of the historical procedures dataset.
|
||||
### Key Features
|
||||
- Filtering on any combination of columns
|
||||
- Grouping and aggregation of results
|
||||
### Dataset Overview
|
||||
Detected columns:
|
||||
- **member_name**: e.g., Alice, Bob, Charlie...
|
||||
- **relationship**: e.g., Mother, Father, Son...
|
||||
- **age**: e.g., 42, 45, 12...
|
||||
- **gender**: e.g., Female, Male
|
||||
- **procedure**: e.g., Annual Physical Exam, Appendectomy, CT Scan...
|
||||
- **procedure_type**: e.g., preventive, surgery, diagnostic...
|
||||
- **location**: e.g., City Hospital, Green Valley Clinic, Sunrise Health...
|
||||
- **date**: e.g., 2024-04-28, 2023-05-02, 2022-05-11...
|
||||
- **in_network**: e.g., True, False
|
||||
- **member_plan**: e.g., Gold PPO, Family Plan - Silver EPO
|
||||
- **accepted_plans**: e.g., Gold PPO, Family Plan - Silver EPO, Medicare Advantage, Gold PPO, Family Plan - Silver EPO, Family Plan - Silver EPO, Medicare Advantage...
|
||||
- **cost_facility**: e.g., 29.4, 48.02, 30.8...
|
||||
- **cost_physician**: e.g., 199.09, 189.75, 128.9...
|
||||
- **cost_anesthesia**: e.g., 0.0, 2024.21, 2257.4...
|
||||
- **cost_medication**: e.g., 4.19, 5.53, 7.15...
|
||||
- **total_cost**: e.g., 232.68, 243.3, 166.85...
|
||||
- **facility_rating**: e.g., 4.7, 4.5, 4.6...
|
||||
- **notes**: e.g., Annual Physical Exam performed at City Hospital., Appendectomy performed at City Hospital., CT Scan performed at Green Valley Clinic....
|
||||
### Example Input:
|
||||
```json
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "member_name",
|
||||
"operator": "equals",
|
||||
"value": "Alice"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "member_name",
|
||||
"operator": "contains",
|
||||
"value": "Ali"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "member_name",
|
||||
"operator": "ne",
|
||||
"value": "Alice"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "gt",
|
||||
"value": 22.69
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "lt",
|
||||
"value": 27.73
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "ge",
|
||||
"value": 25
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "le",
|
||||
"value": 25
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "ne",
|
||||
"value": 25
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"group_by": [
|
||||
"member_name",
|
||||
"relationship"
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "member_name",
|
||||
"operator": "equals",
|
||||
"value": "Alice"
|
||||
},
|
||||
{
|
||||
"column": "age",
|
||||
"operator": "ge",
|
||||
"value": 12.0
|
||||
}
|
||||
],
|
||||
"group_by": [
|
||||
"relationship"
|
||||
]
|
||||
}
|
||||
```
|
||||
Example Questions:
|
||||
- "What rows match member_name = Alice?" → `{"filters": [{"column": "member_name", "operator": "equals", "value": "Alice"}]}`
|
||||
- "What rows do not match member_name = Alice?" → `{"filters": [{"column": "member_name", "operator": "ne", "value": "Alice"}]}`
|
||||
- "What rows contain 'Ali' in member_name?" → `{"filters": [{"column": "member_name", "operator": "contains", "value": "Ali"}]}`
|
||||
- "What rows have age greater than 25.21?" → `{"filters": [{"column": "age", "operator": "gt", "value": 25.21}]}`
|
||||
- "What rows have age less than 25.21?" → `{"filters": [{"column": "age", "operator": "lt", "value": 25.21}]}`
|
||||
- "What rows have age greater than or equal to 25.21?" → `{"filters": [{"column": "age", "operator": "ge", "value": 25.21}]}`
|
||||
- "What rows have age less than or equal to 25.21?" → `{"filters": [{"column": "age", "operator": "le", "value": 25.21}]}`
|
||||
- "What rows do not have age equal to 25.21?" → `{"filters": [{"column": "age", "operator": "ne", "value": 25.21}]}`
|
||||
- "What is the average of age grouped by member_name?" → `{"group_by": ["member_name"]}`
|
||||
- "What is the total age for member_name = 25.210526315789473 grouped by relationship?" → `{"filters": [{"column": "member_name", "operator": "equals", "value": "25.210526315789473"}], "group_by": ["relationship"]}`
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProcedureQuery'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
result:
|
||||
type: object
|
||||
/available-procedures:
|
||||
post:
|
||||
summary: This tool enables intelligent analysis and summarization of the available
|
||||
procedures dataset.
|
||||
description: |-
|
||||
This tool enables intelligent analysis and summarization of the available procedures dataset.
|
||||
### Key Features
|
||||
- Filtering on any combination of columns
|
||||
- Grouping and aggregation of results
|
||||
### Dataset Overview
|
||||
Detected columns:
|
||||
- **procedure**: e.g., Angioplasty, Annual Physical Exam, Appendectomy...
|
||||
- **location**: e.g., City Hospital, Regional Medical Center, Green Valley Clinic...
|
||||
- **facility_rating**: e.g., 4.7, 4.3, 4.5...
|
||||
- **distance_miles**: e.g., 5.2, 12.6, 1.2...
|
||||
- **gold_ppo_plan_accepted**: e.g., True, False
|
||||
- **silver_epo_plan_accepted**: e.g., True
|
||||
- **accepted_plans**: e.g., Gold PPO, Family Plan - Silver EPO, Medicare Advantage, Family Plan - Silver EPO, Bronze HDHP, Medicaid, Gold PPO, Family Plan - Silver EPO...
|
||||
- **cost_facility**: e.g., 9432.8, 23594.95, 3807.32...
|
||||
- **cost_physician**: e.g., 4774.57, 4897.27, 5687.8...
|
||||
- **cost_anesthesia**: e.g., 1894.37, 581.04, 293.41...
|
||||
- **cost_medication**: e.g., 834.8, 783.86, 1301.58...
|
||||
- **total_cost**: e.g., 16936.54, 29857.12, 11090.11...
|
||||
### Example Input:
|
||||
```json
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "procedure",
|
||||
"operator": "equals",
|
||||
"value": "Angioplasty"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "procedure",
|
||||
"operator": "contains",
|
||||
"value": "Ang"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "procedure",
|
||||
"operator": "ne",
|
||||
"value": "Angioplasty"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "gt",
|
||||
"value": 4.01
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "lt",
|
||||
"value": 4.9
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "ge",
|
||||
"value": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "le",
|
||||
"value": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "ne",
|
||||
"value": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"group_by": [
|
||||
"procedure",
|
||||
"location"
|
||||
]
|
||||
}
|
||||
{
|
||||
"filters": [
|
||||
{
|
||||
"column": "procedure",
|
||||
"operator": "equals",
|
||||
"value": "Angioplasty"
|
||||
},
|
||||
{
|
||||
"column": "facility_rating",
|
||||
"operator": "ge",
|
||||
"value": 4.5
|
||||
}
|
||||
],
|
||||
"group_by": [
|
||||
"location"
|
||||
]
|
||||
}
|
||||
```
|
||||
Example Questions:
|
||||
- "What rows match procedure = Angioplasty?" → `{"filters": [{"column": "procedure", "operator": "equals", "value": "Angioplasty"}]}`
|
||||
- "What rows do not match procedure = Angioplasty?" → `{"filters": [{"column": "procedure", "operator": "ne", "value": "Angioplasty"}]}`
|
||||
- "What rows contain 'Ang' in procedure?" → `{"filters": [{"column": "procedure", "operator": "contains", "value": "Ang"}]}`
|
||||
- "What rows have facility_rating greater than 4.45?" → `{"filters": [{"column": "facility_rating", "operator": "gt", "value": 4.45}]}`
|
||||
- "What rows have facility_rating less than 4.45?" → `{"filters": [{"column": "facility_rating", "operator": "lt", "value": 4.45}]}`
|
||||
- "What rows have facility_rating greater than or equal to 4.45?" → `{"filters": [{"column": "facility_rating", "operator": "ge", "value": 4.45}]}`
|
||||
- "What rows have facility_rating less than or equal to 4.45?" → `{"filters": [{"column": "facility_rating", "operator": "le", "value": 4.45}]}`
|
||||
- "What rows do not have facility_rating equal to 4.45?" → `{"filters": [{"column": "facility_rating", "operator": "ne", "value": 4.45}]}`
|
||||
- "What is the average of facility_rating grouped by procedure?" → `{"group_by": ["procedure"]}`
|
||||
- "What is the total facility_rating for procedure = 4.450442477876106 grouped by location?" → `{"filters": [{"column": "procedure", "operator": "equals", "value": "4.450442477876106"}], "group_by": ["location"]}`
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProcedureQuery'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
result:
|
||||
type: object
|
||||
/member-insights:
|
||||
get:
|
||||
summary: Returns member data including plan information and overdue procedures.
|
||||
description: |-
|
||||
Returns member data including:
|
||||
- Plan information (medical, pharmacy, mental health, wellness, tax documents)
|
||||
- Overdue preventive procedures
|
||||
responses:
|
||||
'200':
|
||||
description: Member profile and plan data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
result:
|
||||
type: object
|
||||
/schedule:
|
||||
get:
|
||||
summary: Provides appointment scheduling guidance.
|
||||
description: Provides appointment scheduling guidelines to help users arrange
|
||||
medical visits through a live scheduling system.
|
||||
responses:
|
||||
'200':
|
||||
description: Synthetic appointment instructions
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
result:
|
||||
type: string
|
||||
components:
|
||||
schemas:
|
||||
ProcedureQuery:
|
||||
type: object
|
||||
properties:
|
||||
filters:
|
||||
type: string
|
||||
description: JSON-encoded list of filter objects
|
||||
example: '[{"column": "procedure", "operator": "equals", "value": "X ray"}]'
|
||||
group_by:
|
||||
type: string
|
||||
description: JSON-encoded list of columns to group by
|
||||
example: '["facility_rating"]'
|
||||
Reference in New Issue
Block a user