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

    result = None
    async for partial_response in response:
        result = partial_response
        assert hasattr(result, "content")

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