csc-cia-stne 0.1.41__tar.gz → 0.1.43__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.
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/PKG-INFO +1 -1
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/pyproject.toml +1 -1
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/jerry.py +8 -6
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne.egg-info/PKG-INFO +1 -1
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/LICENCE +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/README.md +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/README_PYPI.md +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/setup.cfg +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/__init__.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/bc_correios.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/bc_sta.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/email.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/ftp.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/gcp_bigquery.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/gcp_bucket.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/gcp_document_ai.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/google_drive.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/karavela.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/logger_json.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/logger_rich.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/provio.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/servicenow.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/slack.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/stne_admin.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/__init__.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/__init__.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_b64.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_converters.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_datetime.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_delete.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_get_secret.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_pdf_extract.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_recriar_pastas.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_settings.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_titulo.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_validate_json.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/ServiceNowValidator.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/__init__.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/ftp.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/gcp_bucket.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/waccess.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/web_validator.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/web_screen/__init__.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/web_screen/web_screen_abstract.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/web_screen/web_screen_botcity.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/web_screen/web_screen_selenium.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/wacess.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/web.py +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne.egg-info/SOURCES.txt +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne.egg-info/dependency_links.txt +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne.egg-info/requires.txt +0 -0
- {csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "csc_cia_stne"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.43"
|
|
8
8
|
license = { text = "MIT" }
|
|
9
9
|
description = "Biblioteca do time CSC-CIA utilizada no desenvolvimento de RPAs"
|
|
10
10
|
keywords = ["karavela", "csc", "cia", "stone", "rpa", "botcity", "stne"]
|
|
@@ -176,7 +176,7 @@ class JerryClient:
|
|
|
176
176
|
self.error = f"Erro na autenticação: {e}"
|
|
177
177
|
return None
|
|
178
178
|
|
|
179
|
-
def v1_enviar_para_ia(self, system_prompt: str, user_prompt: str, arquivos: Optional[List[Dict[str, str]]] = None, tools: Optional[List[Dict[str, Any]]] = None, temperature: float = 0.3) -> Dict[str, Any]:
|
|
179
|
+
def v1_enviar_para_ia(self, system_prompt: str, user_prompt: str, arquivos: Optional[List[Dict[str, str]]] = None, tools: Optional[List[Dict[str, Any]]] = None, temperature: float = 0.3, tool_choice: Optional[str] = None) -> Dict[str, Any]:
|
|
180
180
|
"""
|
|
181
181
|
Envia prompts e opcionalmente múltiplas imagens para a IA via Databricks.
|
|
182
182
|
|
|
@@ -192,6 +192,7 @@ class JerryClient:
|
|
|
192
192
|
- file_path: Caminho original da imagem (opcional, para logs)
|
|
193
193
|
temperature (float): Temperatura para a geração de texto (default = 0.3)
|
|
194
194
|
tools (Optional[List[Dict[str, Any]]]): Lista de ferramentas (tools) para fornecer à IA
|
|
195
|
+
tool_choice (Optional[str]): required, auto
|
|
195
196
|
|
|
196
197
|
Tipos de imagem suportados:
|
|
197
198
|
✅ image/jpeg, image/jpg, image/png, image/gif, image/webp, image/bmp, image/tiff
|
|
@@ -386,9 +387,9 @@ class JerryClient:
|
|
|
386
387
|
image_size = len(decoded_data)
|
|
387
388
|
total_size += image_size
|
|
388
389
|
|
|
389
|
-
# Limite por imagem:
|
|
390
|
-
if image_size >
|
|
391
|
-
error = f"Imagem '{arquivo_name}': Tamanho muito grande ({image_size:,} bytes). Máximo:
|
|
390
|
+
# Limite por imagem: 4MB
|
|
391
|
+
if image_size > 4 * 1024 * 1024:
|
|
392
|
+
error = f"Imagem '{arquivo_name}': Tamanho muito grande ({image_size:,} bytes). Máximo: 4MB"
|
|
392
393
|
validation_errors.append(error)
|
|
393
394
|
images_stats["rejected"] += 1
|
|
394
395
|
images_stats["rejected_files"].append({"filename": arquivo_name, "error": error})
|
|
@@ -410,8 +411,8 @@ class JerryClient:
|
|
|
410
411
|
self.log.info(f"{jerry_prompt} ✅ {arquivo_name} ({arquivo_mime}, {image_size:,} bytes)")
|
|
411
412
|
|
|
412
413
|
# 2.9 Validar tamanho total
|
|
413
|
-
if total_size >
|
|
414
|
-
error = f"Tamanho total das imagens muito grande ({total_size:,} bytes). Máximo:
|
|
414
|
+
if total_size > 4 * 1024 * 1024: # 4MB total
|
|
415
|
+
error = f"Tamanho total das imagens muito grande ({total_size:,} bytes). Máximo: 4MB"
|
|
415
416
|
validation_errors.append(error)
|
|
416
417
|
self.log.error(f"{jerry_prompt}❌ {error}")
|
|
417
418
|
|
|
@@ -506,6 +507,7 @@ class JerryClient:
|
|
|
506
507
|
response = self.client.chat.completions.create(
|
|
507
508
|
model=self.ia_model,
|
|
508
509
|
tools=tools,
|
|
510
|
+
tool_choice=tool_choice,
|
|
509
511
|
temperature=temperature,
|
|
510
512
|
messages=messages,
|
|
511
513
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/__init__.py
RENAMED
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_b64.py
RENAMED
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_datetime.py
RENAMED
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_delete.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_settings.py
RENAMED
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/functions/func_titulo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/gcp_bucket.py
RENAMED
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/validations/waccess.py
RENAMED
|
File without changes
|
|
File without changes
|
{csc_cia_stne-0.1.41 → csc_cia_stne-0.1.43}/src/csc_cia_stne/utilitarios/web_screen/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|