diff --git a/backend/app/main.py b/backend/app/main.py index 65b0c2d..11a0693 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -204,7 +204,7 @@ def send_completed_inspection_to_n8n(inspection, db): # No lanzamos excepción para no interrumpir el flujo normal -BACKEND_VERSION = "1.0.85" +BACKEND_VERSION = "1.0.86" app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION) # S3/MinIO configuration @@ -2965,7 +2965,7 @@ FORMATO DE RESPUESTA: client = OpenAI(api_key=ai_config.api_key) response = client.chat.completions.create( - model=ai_config.model or "gpt-4", + model=ai_config.model_name or "gpt-4", messages=messages, max_tokens=max_tokens, temperature=0.7 @@ -2978,7 +2978,7 @@ FORMATO DE RESPUESTA: import google.generativeai as genai genai.configure(api_key=ai_config.api_key) - model = genai.GenerativeModel(ai_config.model or 'gemini-pro') + model = genai.GenerativeModel(ai_config.model_name or 'gemini-pro') # Gemini maneja el chat diferente # Convertir mensajes al formato de Gemini @@ -3003,7 +3003,7 @@ FORMATO DE RESPUESTA: "response": ai_response, "confidence": confidence, "provider": ai_config.provider, - "model": ai_config.model + "model": ai_config.model_name } except Exception as e: