def test_parse_streaming_line_error_object(self):
        """Ensures that an exception is raised for error objects in the stream."""
        line = 'data: {"object": "error", "message": "Error message"}'
        with pytest.raises(Exception) as exc_info:
            self.base_client._parse_streaming_line(line)
        assert "Error in streaming response: Error message" in str(exc_info.value)
Ensures that an exception is raised for error objects in the stream.
llama-index-integrations/llms/llama-index-llms-oci-data-science/tests/test_oci_data_science_client.py