def test_complex_structured_predict(llm: GoogleGenAI) -> None:
    """Test structured prediction with a complex nested schema."""
    prompt = PromptTemplate("Generate a simple database structure")
    response = llm.structured_predict(output_cls=Schema, prompt=prompt)

    assert response is not None
    assert isinstance(response, Schema)
    assert isinstance(response.schema_name, str)
    assert len(response.schema_name) > 0
    assert len(response.tables) > 0
    assert all(isinstance(table, Table) for table in response.tables)
    assert all(len(table.columns) > 0 for table in response.tables)
Test structured prediction with a complex nested schema.
llama-index-integrations/llms/llama-index-llms-google-genai/tests/test_llms_google_genai.py