iatoolkit 0.5.0__tar.gz → 0.7.0__tar.gz

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.

Files changed (37) hide show
  1. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/PKG-INFO +1 -1
  2. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/pyproject.toml +1 -1
  3. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/base_company.py +0 -5
  4. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/cli_commands.py +1 -1
  5. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/system_prompts/query_main.prompt +2 -3
  6. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit.egg-info/PKG-INFO +1 -1
  7. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/dispatcher_service.py +0 -14
  8. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/document_service.py +1 -1
  9. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/profile_service.py +0 -7
  10. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/prompt_manager_service.py +8 -1
  11. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/readme.md +0 -0
  12. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/requirements.txt +0 -0
  13. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/setup.cfg +0 -0
  14. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/__init__.py +0 -0
  15. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/company_registry.py +0 -0
  16. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/iatoolkit.py +0 -0
  17. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/system_prompts/format_styles.prompt +0 -0
  18. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit/system_prompts/sql_rules.prompt +0 -0
  19. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit.egg-info/SOURCES.txt +0 -0
  20. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit.egg-info/dependency_links.txt +0 -0
  21. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit.egg-info/requires.txt +0 -0
  22. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/iatoolkit.egg-info/top_level.txt +0 -0
  23. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/__init__.py +0 -0
  24. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/api_service.py +0 -0
  25. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/benchmark_service.py +0 -0
  26. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/excel_service.py +0 -0
  27. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/file_processor_service.py +0 -0
  28. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/history_service.py +0 -0
  29. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/jwt_service.py +0 -0
  30. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/load_documents_service.py +0 -0
  31. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/mail_service.py +0 -0
  32. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/query_service.py +0 -0
  33. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/search_service.py +0 -0
  34. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/sql_service.py +0 -0
  35. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/tasks_service.py +0 -0
  36. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/user_feedback_service.py +0 -0
  37. {iatoolkit-0.5.0 → iatoolkit-0.7.0}/src/services/user_session_context_service.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iatoolkit
3
- Version: 0.5.0
3
+ Version: 0.7.0
4
4
  Summary: IAToolkit
5
5
  Author: Fernando Libedinsky
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "iatoolkit"
7
- version = "0.5.0"
7
+ version = "0.7.0"
8
8
  requires-python = ">=3.11"
9
9
  description = "IAToolkit"
10
10
  readme = "readme.md"
@@ -49,11 +49,6 @@ class BaseCompany(ABC):
49
49
  """
50
50
  pass
51
51
 
52
- def get_ui_component_config(self)-> dict:
53
- """
54
- optional method for a company definition of it's UI config
55
- """
56
- pass
57
52
 
58
53
  def unsupported_operation(self, tag):
59
54
  raise NotImplementedError(f"La operación '{tag}' no está soportada por esta empresa.")
@@ -40,7 +40,7 @@ def register_core_commands(app):
40
40
  click.echo("👉 Asegúrate de que el nombre de la compañía es correcto y está registrada.")
41
41
  else:
42
42
  click.echo("✅ ¡Configuración lista! Agrega esta variable a tu entorno:")
43
- click.echo(f"IATOOLKIT_API_KEY={result['api-key']}")
43
+ click.echo(f"IATOOLKIT_API_KEY='{result['api-key']}'")
44
44
  except Exception as e:
45
45
  logging.exception(e)
46
46
  click.echo(f"❌ Ocurrió un error inesperado durante la configuración: {e}")
@@ -28,9 +28,9 @@ El usuario que consulta se identifica como: {{ user_id }}
28
28
  Eres un asistente que responde preguntas sobre empresas y sus clientes.
29
29
 
30
30
  **Reglas obligatorias de contexto:**
31
- 1. Cada vez que el usuario consulte por un cliente (ya sea por RUT o nombre),
31
+ 1. Cada vez que el usuario consulte por un cliente,
32
32
  debes memorizarlo y usarlo como cliente de contexto.
33
- 2. Si el usuario hace una pregunta **sin especificar un cliente** (sin RUT ni nombre),
33
+ 2. Si el usuario hace una pregunta **sin especificar un cliente**,
34
34
  siempre debes asumir que la pregunta se refiere al **último cliente identificado** en la conversación.
35
35
  3. Nunca cambies de cliente de contexto a menos que el usuario especifique uno nuevo.
36
36
  4. Si el usuario pregunta por un cliente que no está en tus registros, responde indicando que no tienes información, pero **no borres el contexto anterior**.
@@ -38,7 +38,6 @@ siempre debes asumir que la pregunta se refiere al **último cliente identificad
38
38
  6. No debes incluir explicaciones, comentarios o texto adicional.
39
39
 
40
40
  **IMPORTANTE:**
41
- Si el usuario no menciona explícitamente nombre ni RUT en la pregunta, SIEMPRE responde usando el **último cliente** del que se obtuvo información.
42
41
 
43
42
  No respondas nunca sobre un cliente anterior si ya se identificó uno nuevo, y nunca pierdas el contexto salvo que el usuario lo cambie explícitamente.
44
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iatoolkit
3
- Version: 0.5.0
3
+ Version: 0.7.0
4
4
  Summary: IAToolkit
5
5
  Author: Fernando Libedinsky
6
6
  License-Expression: MIT
@@ -202,7 +202,6 @@ class Dispatcher:
202
202
  "id": raw_data.get("id", 0),
203
203
  "user_email": raw_data.get("email", ""),
204
204
  "user_fullname": raw_data.get("user_fullname", ""),
205
- "super_user": raw_data.get("super_user", False),
206
205
  "company_id": raw_data.get("company_id", 0),
207
206
  "company_name": raw_data.get("company", ""),
208
207
  "company_short_name": raw_data.get("company_short_name", ""),
@@ -217,19 +216,6 @@ class Dispatcher:
217
216
 
218
217
  return normalized_user
219
218
 
220
- def get_ui_component_config(self, company_name: str) -> dict:
221
- if company_name not in self.company_instances:
222
- raise IAToolkitException(IAToolkitException.ErrorType.EXTERNAL_SOURCE_ERROR,
223
- f"Empresa no configurada: {company_name}")
224
-
225
- company_instance = self.company_instances[company_name]
226
- try:
227
- return company_instance.get_ui_component_config()
228
- except Exception as e:
229
- logging.exception(e)
230
- raise IAToolkitException(IAToolkitException.ErrorType.EXTERNAL_SOURCE_ERROR,
231
- f"Error en get_ui_component_config de {company_name}: {str(e)}") from e
232
-
233
219
  def get_metadata_from_filename(self, company_name: str, filename: str) -> dict:
234
220
  if company_name not in self.company_instances:
235
221
  raise IAToolkitException(IAToolkitException.ErrorType.EXTERNAL_SOURCE_ERROR,
@@ -22,7 +22,7 @@ class DocumentService:
22
22
  try:
23
23
  if filename.lower().endswith('.docx'):
24
24
  return self.read_docx(file_content)
25
- elif filename.lower().endswith('.txt'):
25
+ elif filename.lower().endswith('.txt') or filename.lower().endswith('.md'):
26
26
  if isinstance(file_content, bytes):
27
27
  try:
28
28
  # decode using UTF-8
@@ -80,7 +80,6 @@ class ProfileService:
80
80
  "id": user.id,
81
81
  "email": user.email,
82
82
  "user_fullname": f'{user.first_name} {user.last_name}',
83
- "super_user": user.super_user,
84
83
  "company_id": company.id,
85
84
  "company": company.name,
86
85
  "company_short_name": company.short_name,
@@ -98,7 +97,6 @@ class ProfileService:
98
97
  email: str,
99
98
  first_name: str,
100
99
  last_name: str,
101
- rut: str,
102
100
  password: str,
103
101
  confirm_password: str,
104
102
  verification_url: str) -> dict:
@@ -110,7 +108,6 @@ class ProfileService:
110
108
  return {"error": f"la empresa {company_short_name} no existe"}
111
109
 
112
110
  # normalize format's
113
- rut = rut.lower().replace(" ", "")
114
111
  email = email.lower()
115
112
 
116
113
  # check if user exists
@@ -120,9 +117,6 @@ class ProfileService:
120
117
  if not self.bcrypt.check_password_hash(existing_user.password, password):
121
118
  return {"error": "La contraseña es incorrecta. No se puede agregar a la nueva empresa."}
122
119
 
123
- if rut != existing_user.rut:
124
- return {"error": "El RUT ingresado no corresponde al email existente."}
125
-
126
120
  # check if register
127
121
  if company in existing_user.companies:
128
122
  return {"error": "Usuario ya registrado en esta empresa"}
@@ -145,7 +139,6 @@ class ProfileService:
145
139
 
146
140
  # create the new user
147
141
  new_user = User(email=email,
148
- rut=rut,
149
142
  password=hashed_password,
150
143
  first_name=first_name.lower(),
151
144
  last_name=last_name.lower(),
@@ -29,6 +29,7 @@ class PromptService:
29
29
  category: PromptCategory = None,
30
30
  active: bool = True,
31
31
  is_system_prompt: bool = False,
32
+ custom_fields: list = [],
32
33
  params: dict = {}
33
34
  ):
34
35
 
@@ -54,6 +55,7 @@ class PromptService:
54
55
  active=active,
55
56
  filename=prompt_filename,
56
57
  is_system_prompt=is_system_prompt,
58
+ custom_fields=custom_fields,
57
59
  parameters=params
58
60
  )
59
61
 
@@ -160,7 +162,12 @@ class PromptService:
160
162
  'category_name': cat_name,
161
163
  'category_order': cat_order,
162
164
  'prompts': [
163
- {'prompt': p.name, 'description': p.description, 'order': p.order}
165
+ {
166
+ 'prompt': p.name,
167
+ 'description': p.description,
168
+ 'custom_fields': p.custom_fields,
169
+ 'order': p.order
170
+ }
164
171
  for p in prompts
165
172
  ]
166
173
  })
File without changes
File without changes
File without changes