feat: Update default models for extraction and normalization to GPT-5.6 Luna across configuration files and documentation. Remove deprecated code and improve pricing details in the UI components. Add tests to ensure correct model settings and pricing calculations.
This commit is contained in:
@@ -377,45 +377,6 @@ class DigitadorService:
|
||||
except Exception as e:
|
||||
print(f"Error al guardar reportes: {e}")
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Clipboard (sin tkinter)
|
||||
# ------------------------------------------------------------------
|
||||
def limpiar_clipboard(self) -> None:
|
||||
try:
|
||||
user32 = ctypes.windll.user32
|
||||
if user32.OpenClipboard(0):
|
||||
user32.EmptyClipboard()
|
||||
user32.CloseClipboard()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def leer_clipboard(self) -> str:
|
||||
try:
|
||||
CF_UNICODETEXT = 13
|
||||
user32 = ctypes.windll.user32
|
||||
kernel32 = ctypes.windll.kernel32
|
||||
if not user32.OpenClipboard(0):
|
||||
return ""
|
||||
try:
|
||||
handle = user32.GetClipboardData(CF_UNICODETEXT)
|
||||
if not handle:
|
||||
return ""
|
||||
ptr = kernel32.GlobalLock(handle)
|
||||
if not ptr:
|
||||
return ""
|
||||
try:
|
||||
return ctypes.wstring_at(ptr).strip()
|
||||
finally:
|
||||
kernel32.GlobalUnlock(handle)
|
||||
finally:
|
||||
user32.CloseClipboard()
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
def fecha_tiene_numeros(self, texto) -> bool:
|
||||
texto = str(texto).strip()
|
||||
return any(c.isdigit() for c in texto)
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Fechas / valores / docs
|
||||
# ------------------------------------------------------------------
|
||||
@@ -676,20 +637,6 @@ class DigitadorService:
|
||||
"radicado_existente.png",
|
||||
)
|
||||
|
||||
def check_diferencias_abierto_opencv(self, window) -> bool:
|
||||
return self.check_template_opencv(
|
||||
window,
|
||||
self.template_diferencias_path,
|
||||
"flecha_diferencias_abierto.png",
|
||||
)
|
||||
|
||||
def check_diferencias_cerrado_opencv(self, window) -> bool:
|
||||
return self.check_template_opencv(
|
||||
window,
|
||||
self.template_diferencias_cerrado_path,
|
||||
"flecha_diferencias_cerrado.png",
|
||||
)
|
||||
|
||||
def check_success_opencv(self, window) -> bool:
|
||||
return self.check_template_opencv(
|
||||
window,
|
||||
|
||||
Reference in New Issue
Block a user