async def test_astructured_predict(llm: GoogleGenAI) -> None:
    """Test async structured prediction with a simple schema."""
    response = await llm.astructured_predict(
        output_cls=Poem,
        prompt=PromptTemplate("Write a poem about a magic backpack"),
    )

    assert response is not None
    assert isinstance(response, Poem)
    assert isinstance(response.content, str)
    assert len(response.content) > 0
Test async structured prediction with a simple schema.
llama-index-integrations/llms/llama-index-llms-google-genai/tests/test_llms_google_genai.py