iatoolkit 0.16.7__py3-none-any.whl → 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of iatoolkit might be problematic. Click here for more details.
- iatoolkit/static/js/chat_main.js +18 -4
- iatoolkit/static/styles/chat_iatoolkit.css +18 -19
- iatoolkit/templates/chat.html +2 -1
- {iatoolkit-0.16.7.dist-info → iatoolkit-0.17.0.dist-info}/METADATA +1 -1
- {iatoolkit-0.16.7.dist-info → iatoolkit-0.17.0.dist-info}/RECORD +7 -7
- {iatoolkit-0.16.7.dist-info → iatoolkit-0.17.0.dist-info}/WHEEL +0 -0
- {iatoolkit-0.16.7.dist-info → iatoolkit-0.17.0.dist-info}/top_level.txt +0 -0
iatoolkit/static/js/chat_main.js
CHANGED
|
@@ -314,9 +314,21 @@ const callLLMAPI = async function(apiPath, data, method, timeoutMs = 500000) {
|
|
|
314
314
|
clearTimeout(timeoutId);
|
|
315
315
|
|
|
316
316
|
if (!response.ok) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
try {
|
|
318
|
+
// Intentamos leer el error como JSON, que es el formato esperado de nuestra API.
|
|
319
|
+
const errorData = await response.json();
|
|
320
|
+
const errorMessage = errorData.error_message || 'Error desconocido del servidor.';
|
|
321
|
+
const errorIcon = '<i class="bi bi-exclamation-triangle"></i>';
|
|
322
|
+
const endpointError = $('<div>').addClass('error-section').html(errorIcon + `<p>${errorMessage}</p>`);
|
|
323
|
+
displayBotMessage(endpointError);
|
|
324
|
+
} catch (e) {
|
|
325
|
+
// Si response.json() falla, es porque el cuerpo no era JSON (ej. un 502 con HTML).
|
|
326
|
+
// Mostramos un error genérico y más claro para el usuario.
|
|
327
|
+
const errorMessage = `Error de comunicación con el servidor (${response.status}). Por favor, intente de nuevo más tarde.`;
|
|
328
|
+
const errorIcon = '<i class="bi bi-exclamation-triangle"></i>';
|
|
329
|
+
const infrastructureError = $('<div>').addClass('error-section').html(errorIcon + `<p>${errorMessage}</p>`);
|
|
330
|
+
displayBotMessage(infrastructureError);
|
|
331
|
+
}
|
|
320
332
|
return null;
|
|
321
333
|
}
|
|
322
334
|
return await response.json();
|
|
@@ -325,7 +337,9 @@ const callLLMAPI = async function(apiPath, data, method, timeoutMs = 500000) {
|
|
|
325
337
|
if (error.name === 'AbortError') {
|
|
326
338
|
throw error; // Re-throw to be handled by handleChatMessage
|
|
327
339
|
} else {
|
|
328
|
-
const
|
|
340
|
+
const friendlyMessage = "Ocurrió un error de red. Por favor, inténtalo de nuevo en unos momentos.";
|
|
341
|
+
const errorIcon = '<i class="bi bi-exclamation-triangle"></i>';
|
|
342
|
+
const commError = $('<div>').addClass('error-section').html(errorIcon + `<p>${friendlyMessage}</p>`);
|
|
329
343
|
displayBotMessage(commError);
|
|
330
344
|
}
|
|
331
345
|
return null;
|
|
@@ -123,32 +123,31 @@
|
|
|
123
123
|
word-wrap: break-word;
|
|
124
124
|
padding-top: 0.5em;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
126
|
.error-section {
|
|
128
127
|
align-self: flex-start;
|
|
129
128
|
max-width: 75%;
|
|
130
|
-
min-width:
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
min-width: 250px;
|
|
130
|
+
|
|
131
|
+
color: var(--brand-danger-text, #842029); /* Color de texto de error de la marca */
|
|
132
|
+
background-color: var(--brand-danger-bg, #f8d7da); /* Fondo de error de la marca */
|
|
133
|
+
border: 1px solid var(--brand-danger-border, #f5c2c7); /* Borde de error de la marca */
|
|
134
|
+
font-style: italic;
|
|
135
|
+
font-size: 0.9rem;
|
|
133
136
|
display: flex;
|
|
134
|
-
align-items:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
font-family: Arial, sans-serif;
|
|
142
|
-
font-size: 15px;
|
|
143
|
-
line-height: 1.5;
|
|
144
|
-
word-wrap: break-word;
|
|
145
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: start;
|
|
139
|
+
margin: 10px 0;
|
|
140
|
+
padding: 10px 15px; /* Un poco más de padding lateral */
|
|
141
|
+
opacity: 0.9;
|
|
142
|
+
border-radius: 8px; /* Bordes redondeados */
|
|
143
|
+
word-wrap: break-word; /* Asegura que el texto no se desborde */
|
|
146
144
|
}
|
|
147
145
|
|
|
148
146
|
.error-section i {
|
|
149
|
-
color: #
|
|
150
|
-
font-size: 1.
|
|
151
|
-
|
|
147
|
+
color: var(--brand-danger-color, #dc3545); /* Color del icono, el rojo principal */
|
|
148
|
+
font-size: 1.2rem; /* Tamaño del icono */
|
|
149
|
+
margin-right: 10px; /* Espacio entre el icono y el texto */
|
|
150
|
+
flex-shrink: 0; /* Evita que el icono se encoja */
|
|
152
151
|
}
|
|
153
152
|
|
|
154
153
|
#question {
|
iatoolkit/templates/chat.html
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
<span style="{{ branding.primary_text_style }}">
|
|
18
18
|
{{ branding.name }}
|
|
19
19
|
</span>
|
|
20
|
-
<span class="ms-2" data-bs-toggle="tooltip" data-bs-placement="bottom"
|
|
20
|
+
<span class="ms-2" data-bs-toggle="tooltip" data-bs-placement="bottom"
|
|
21
|
+
title="Powered by IAToolkit ({{ iatoolkit_version }})">
|
|
21
22
|
<i class="bi bi-info-circle" style="color: {{ branding.header_text_color }}; opacity: 0.7; font-size: 0.9rem;"></i>
|
|
22
23
|
</span>
|
|
23
24
|
</div>
|
|
@@ -66,8 +66,8 @@ iatoolkit/static/images/upload.png,sha256=zh5FiINURpaWZQF86bF_gALBX4W1c4aLp5wPQO
|
|
|
66
66
|
iatoolkit/static/js/chat_feedback.js,sha256=_izl49hFEUZYREcJoaPukpTs0YjDgJYUu-QfPt5Ll2s,4398
|
|
67
67
|
iatoolkit/static/js/chat_filepond.js,sha256=mzXafm7a506EpM37KATTK3zvAswO1E0KSUY1vKbwuRc,3163
|
|
68
68
|
iatoolkit/static/js/chat_history.js,sha256=G01rKSXOpLpIavycGPbfpfYg5vmPrLhkHYbCLhY3_zs,3964
|
|
69
|
-
iatoolkit/static/js/chat_main.js,sha256=
|
|
70
|
-
iatoolkit/static/styles/chat_iatoolkit.css,sha256=
|
|
69
|
+
iatoolkit/static/js/chat_main.js,sha256=mJH3mWn_-4xeBhGdHiQFDDp7l2_OdWhXc7r1v_A22pE,17313
|
|
70
|
+
iatoolkit/static/styles/chat_iatoolkit.css,sha256=36987PwwNc_H86zCHZMllLT8SPAo7v2b60jC8p0LFEM,11271
|
|
71
71
|
iatoolkit/static/styles/chat_info.css,sha256=17DbgoNYE21VYWfb5L9-QLCpD2R1idK4imKRLwXtJLY,1058
|
|
72
72
|
iatoolkit/static/styles/chat_modal.css,sha256=pE7JY5D63Ds_d2FKdmxym4sevvg-2Mf7yo-gB7KA9vE,3730
|
|
73
73
|
iatoolkit/static/styles/llm_output.css,sha256=AlxgRSOleeCk2dLAqFWVaQ-jwZiJjcpC5rHuUv3T6VU,2312
|
|
@@ -77,7 +77,7 @@ iatoolkit/system_prompts/sql_rules.prompt,sha256=y4nURVnb9AyFwt-lrbMNBHHtZlhk6kC
|
|
|
77
77
|
iatoolkit/templates/about.html,sha256=ciC08grUVz5qLzdzDDqDX31xirg5PrJIRYabWpV9oA8,294
|
|
78
78
|
iatoolkit/templates/base.html,sha256=TojvSnVvXkTe7Kpt_BBWoXFfZN6dveKD0VqQjUOXdgU,2212
|
|
79
79
|
iatoolkit/templates/change_password.html,sha256=DFfQSFcZ2YJZNFis2IXfzEKStxTf4i9f4eQ_6GiyNs8,2342
|
|
80
|
-
iatoolkit/templates/chat.html,sha256=
|
|
80
|
+
iatoolkit/templates/chat.html,sha256=HpQxZHqlPN6iOuMaWQPOlrqyC7Aib3AYpboRAokLHZk,9491
|
|
81
81
|
iatoolkit/templates/chat_modals.html,sha256=tMyVPiZ904nm7wXFN3TWf4CTgOSgtJA7TRhCPmawaj0,5795
|
|
82
82
|
iatoolkit/templates/error.html,sha256=BNF-7z8AYL5vF4ZMUFMrOBt8c85kCFrm9qSHn9EiHWg,540
|
|
83
83
|
iatoolkit/templates/forgot_password.html,sha256=1lUbKg9CKnQdnySplceY_pibwYne1-mOlM38fqI1kW8,1563
|
|
@@ -104,7 +104,7 @@ iatoolkit/views/tasks_review_view.py,sha256=keLsLCyOTTlcoIapnB_lbuSvLwrPVZVpBiFC
|
|
|
104
104
|
iatoolkit/views/tasks_view.py,sha256=a3anTXrJTTvbQuc6PSpOzidLKQFL4hWa7PI2Cppcz8w,4110
|
|
105
105
|
iatoolkit/views/user_feedback_view.py,sha256=G37zmP8P4LvZrSymNJ5iFXhLZg1A3BEwRfTpH1Iam5w,2652
|
|
106
106
|
iatoolkit/views/verify_user_view.py,sha256=a3q4wHJ8mKAEmgbNTOcnX4rMikROjOR3mHvCr30qGGA,2351
|
|
107
|
-
iatoolkit-0.
|
|
108
|
-
iatoolkit-0.
|
|
109
|
-
iatoolkit-0.
|
|
110
|
-
iatoolkit-0.
|
|
107
|
+
iatoolkit-0.17.0.dist-info/METADATA,sha256=vVdCKmNHGADogi7NP--_-As4wdbk-weGUPd4uLSfpH8,9301
|
|
108
|
+
iatoolkit-0.17.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
109
|
+
iatoolkit-0.17.0.dist-info/top_level.txt,sha256=V_w4QvDx0b1RXiy8zTCrD1Bp7AZkFe3_O0-9fMiwogg,10
|
|
110
|
+
iatoolkit-0.17.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|