def test_stream_chat_empty_content(mock_stream_chat):
    """Test stream_chat method with empty content in delta."""
    # Create mock chunks for the response
    mock_chunk1 = MagicMock()
    mock_chunk1.delta = "Thinking..."

    mock_chunk2 = MagicMock()
    mock_chunk2.delta = "Final response"

    # Set up the mock to return our test chunks
    mock_stream_chat.return_value = [mock_chunk1, mock_chunk2]

    # Create the ASI instance
    llm = ASI(api_key="test_key")

    # Call stream_chat
    messages = [ChatMessage(role=MessageRole.USER, content="Test message")]
    stream = llm.stream_chat(messages)

    # Check that we get the expected response
    chunks = list(stream)
    assert len(chunks) == 2
    assert chunks[0].delta == "Thinking..."
    assert chunks[1].delta == "Final response"

    # Verify that stream_chat was called with the right arguments
    mock_stream_chat.assert_called_once_with(messages)
Test stream_chat method with empty content in delta.
llama-index-integrations/llms/llama-index-llms-asi/tests/test_llms_asi.py