Pensando

Los modelos de pensamiento se entrenan para generar el “proceso de pensamiento” que atraviesa el modelo como parte de su respuesta. Como resultado, los modelos de pensamiento son capaces de realizar razonamientos más sólidos en sus respuestas que los modelos de base equivalentes.

Usa el pensamiento

Los modelos experimentales de Gemini 2.5 Pro están disponibles como un modelo experimental en Vertex AI. Para usar el modelo experimental más reciente de Gemini 2.5 Pro, selecciona el modelo gemini-2.5-pro-exp-03-25 en el menú desplegable Modelo.

Gen AI SDK for Python

Instalar

pip install --upgrade google-genai
Para obtener más información, consulta la documentación de referencia del SDK.

Establece variables de entorno para usar el SDK de Gen AI con Vertex AI:

# Replace the `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` values
# with appropriate values for your project.
export GOOGLE_CLOUD_PROJECT=GOOGLE_CLOUD_PROJECT
export GOOGLE_CLOUD_LOCATION=us-central1
export GOOGLE_GENAI_USE_VERTEXAI=True

from google import genai

client = genai.Client()
response = client.models.generate_content(
    model="gemini-2.5-pro-exp-03-25",
    contents="solve x^2 + 4x + 4 = 0",
)
print(response.text)
# Example Response:
#     Okay, let's solve the quadratic equation x² + 4x + 4 = 0.
#
#     There are a few ways to solve this:
#
#     **Method 1: Factoring**
#
#     1.  **Look for two numbers** that multiply to the constant term (4) and add up to the coefficient of the x term (4).
#         *   The numbers are 2 and 2 (since 2 * 2 = 4 and 2 + 2 = 4).
#     2.  **Factor the quadratic** using these numbers:
#         (x + 2)(x + 2) = 0
#         This can also be written as:
#         (x + 2)² = 0
#     3.  **Set the factor equal to zero** and solve for x:
#         x + 2 = 0
#         x = -2
#
#     This type of solution, where the factor is repeated, is called a repeated root or a root with multiplicity 2.
#
#     **Method 2: Using the Quadratic Formula**
#
#     The quadratic formula solves for x in any equation of the form ax² + bx + c = 0:
#     x = [-b ± √(b² - 4ac)] / 2a
#
#     1.  **Identify a, b, and c** in the equation x² + 4x + 4 = 0:
#         *   a = 1
#         *   b = 4
#         *   c = 4
#     2.  **Substitute these values into the formula:**
#         x = [-4 ± √(4² - 4 * 1 * 4)] / (2 * 1)
#     3.  **Simplify:**
#         x = [-4 ± √(16 - 16)] / 2
#         x = [-4 ± √0] / 2
#         x = [-4 ± 0] / 2
#     4.  **Calculate the result:**
#         x = -4 / 2
#         x = -2
#
#     Both methods give the same solution.
#
#     **Answer:**
#     The solution to the equation x² + 4x + 4 = 0 is **x = -2**.

Limitaciones

Gemini 2.5 Pro Experimental es un modelo experimental y tiene las siguientes limitaciones:

  • Límite de entrada de 1 millón de tokens
  • Entrada de texto, imagen, audio y video
  • Límite de salida de tokens de 64,000
  • Salida de solo texto

Próximos pasos

Prueba Gemini 2.5 Pro Experimental con nuestro notebook de Colab, o abre la consola de Vertex AI y prueba solicitar el modelo por tu cuenta.